Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ on:
branches: [main]
pull_request:

# A newer push to the same PR supersedes the run in flight, so cancel it rather than
# let both occupy the org's concurrent-job slots. Pushes to main are never cancelled:
# every main commit keeps its own result. That needs a per-commit group for pushes —
# a shared group still holds only one pending run and cancels the older pending one
# when a third arrives, even with cancel-in-progress off.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

# Least privilege: this workflow only ever reads the checkout. Without an explicit
# block the token inherits the org default, which is often read-write.
permissions:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ on:
- ".github/workflows/docs.yml"
- ".github/scripts/docs-staleness.mjs"

# A newer push to the same PR supersedes the run in flight, so cancel it rather than
# let both occupy the org's concurrent-job slots. Pushes to main are never cancelled:
# every main commit keeps its own result. That needs a per-commit group for pushes —
# a shared group still holds only one pending run and cancels the older pending one
# when a third arrives, even with cancel-in-progress off.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

Expand Down
Loading