Skip to content

Commit d62b44b

Browse files
committed
CI: Add concurrency control to semver-checks PR job
This is to avoid a race condition where a job scheduled for a first push finished after the job scheduled for a second push, resulting in incorrectly assigning / removing a label to PR.
1 parent 4297204 commit d62b44b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/semver_checks.yml

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
# has permissions.
3333
permissions: {}
3434
timeout-minutes: 30
35+
# This is to prevent a situation, when job A triggered by push 1 finishes
36+
# after job B triggered by push 2. That could result in incorrectly assigning
37+
# or removing a PR label.
38+
concurrency:
39+
group: semver-pull-request-check-${{ env.PR_ID }}
40+
cancel-in-progress: true
3541
outputs:
3642
exitcode: ${{ steps.semver-pr-check.outputs.exitcode }}
3743
output: ${{ steps.semver-pr-check.outputs.output }}

0 commit comments

Comments
 (0)