diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4d6978..e447cf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,11 @@ on: permissions: contents: read +# A newer push to the same pull request supersedes the older run. Pushes to +# main never share a group, so each main commit keeps a complete run. concurrency: - group: ci-${{ github.ref }} - cancel-in-progress: true + group: ci-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: check: