mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
name: Nightly
|
|
on:
|
|
schedule:
|
|
- cron: "0 1 * * *"
|
|
workflow_dispatch: ~
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
GENERATE_MATRIX:
|
|
name: Generate Matrix
|
|
if: github.repository == 'php/php-src' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
all_variations: ${{ steps.set-matrix.outputs.all_variations }}
|
|
branches: ${{ steps.set-matrix.outputs.branches }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
# Set fetch-depth to 0 to clone the full repository
|
|
# including all branches. This is required to find
|
|
# the correct commit hashes.
|
|
fetch-depth: 0
|
|
- name: Grab the commit mapping
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: branch-commit-cache.json
|
|
# The cache key needs to change every time for the
|
|
# cache to be updated after this job finishes.
|
|
key: nightly-${{ github.run_id }}-${{ github.run_attempt }}
|
|
restore-keys: |
|
|
nightly-
|
|
- name: Generate Matrix
|
|
id: set-matrix
|
|
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.head_ref || github.ref_name }}" '[]' "${{ github.repository }}"
|
|
NIGHTLY:
|
|
needs: GENERATE_MATRIX
|
|
name: ${{ matrix.branch.ref }}
|
|
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
|
|
uses: ./.github/workflows/nightly.yml
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
|
|
with:
|
|
all_variations: ${{ needs.GENERATE_MATRIX.outputs.all_variations == 'true' }}
|
|
branch: ${{ toJSON(matrix.branch) }}
|
|
secrets: inherit
|