diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2757e10bdb..d7f5b4e77b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,19 +9,23 @@ on: branches: [main] schedule: - cron: "37 3 * * *" + # `labeled` so adding the `full-ci` label starts a run of all six shards. pull_request: + types: [opened, synchronize, reopened, labeled] workflow_dispatch: permissions: contents: read -# A newer push to a PR branch cancels its older run; every push to main runs to the end. +# A newer push to a PR branch cancels its older run; every push to main runs to the end. Adding +# any label other than `full-ci` gets a group of its own, so it never cancels a real run. concurrency: - group: ci-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} + group: ci-${{ github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.ref || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: gate: + if: github.event.action != 'labeled' || github.event.label.name == 'full-ci' # Tracks @main so suite-wide CI fixes reach every app without a PR in each repository. uses: storytold/craft-common-actions/.github/workflows/gate.yml@main with: