Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
workflow_call: {}
workflow_dispatch: {}

# Pushing three times to a branch used to queue three full matrices and run all of them. A newer
# pull-request run supersedes the older one; a push to main is not cancelled, because main wants a
# recorded result for every commit rather than only for the newest.
concurrency:
group: ci-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Comment on lines +17 to +18

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid dropping queued non-PR runs

When three workflow_dispatch runs target the same ref, GitHub Actions allows only one running and one pending member of a concurrency group; the newest run cancels the existing pending run even when cancel-in-progress is false. Consequently, this configuration can still discard an intermediate main-ref run, contrary to the stated requirement that non-PR runs are preserved. Apply this concurrency group only to PR runs or give non-cancellable runs unique group keys.

Useful? React with 👍 / 👎.


jobs:
ci:
uses: Hawkynt/RepositoryTemplate/.github/workflows/dotnet-ci.yml@v1
Expand Down
Loading