From 387b6a5bbf37dff8c881373c5693fb31d62dbdc1 Mon Sep 17 00:00:00 2001 From: Chase H Date: Wed, 11 Nov 2026 12:02:26 -0800 Subject: [PATCH] Skip CI on draft PRs and cancel superseded PR runs in ci.yml Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad62542..5ceca00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,17 @@ on: branches: [main] pull_request: branches: [main] + # ready_for_review: a draft's run skips every job, so marking the PR ready is what starts the real run. + types: [opened, synchronize, reopened, ready_for_review] + +# Cancel a PR's in-flight run when a newer push supersedes it. Any other event keys on run_id, so it never shares a group. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: test: + if: github.event.pull_request.draft != true runs-on: ubuntu-latest strategy: matrix: