ci: cancel stale workflow runs per PR or ref

Add workflow-level concurrency to the direct GitHub Actions entrypoints so a
newer run for the same pull request or repository ref cancels the older
in-progress run.

Keep the reusable workflow graph, release guards, triggers, and permissions
unchanged while documenting the concurrency policy and the official GitHub
references used for the change.

closes https://github.com/official-stockfish/Stockfish/pull/6773

No functional change.
This commit is contained in:
ppigazzini
2026-04-26 09:39:38 +02:00
committed by Joost VandeVondele
parent 692d90bd74
commit b35a064eae
3 changed files with 13 additions and 0 deletions
+4
View File
@@ -12,6 +12,10 @@ on:
- "**.cpp"
- "**.h"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
pull-requests: write
+4
View File
@@ -9,6 +9,10 @@ on:
schedule:
- cron: "17 18 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
+5
View File
@@ -11,6 +11,11 @@ on:
branches:
- master
- tools
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
Prerelease:
if: github.repository == 'official-stockfish/Stockfish' && (github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag'))