Skip to content

Commit 3e8bb1a

Browse files
ci: Serialize verify-api and format-code per PR
Both workflows auto-commit and push to the PR branch. If both fire on the same PR and both find changes, the second git push is rejected as non-fast-forward. Share a concurrency group so only one runs at a time per PR.
1 parent 53cad9c commit 3e8bb1a

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/format-code.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
- 'samples/**'
88
- '.github/workflows/format-code.yml'
99

10+
# Serialize with verify-api.yml so the two auto-commit workflows can't race
11+
# each other's git push on the same PR branch.
12+
concurrency:
13+
group: pr-auto-commit-${{ github.event.pull_request.number }}
14+
cancel-in-progress: false
15+
1016
jobs:
1117
format-code:
1218
name: Format Code

.github/workflows/verify-api.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
- 'test/Sentry.Testing/ApiExtensions.cs'
88
- '.github/workflows/verify-api.yml'
99

10+
# Serialize with format-code.yml so the two auto-commit workflows can't race
11+
# each other's git push on the same PR branch.
12+
concurrency:
13+
group: pr-auto-commit-${{ github.event.pull_request.number }}
14+
cancel-in-progress: false
15+
1016
jobs:
1117
run-api-tests:
1218
name: Run API Approval Tests (${{ matrix.rid }})

0 commit comments

Comments
 (0)