Commit a4ff8bc
authored
ci: add concurrency groups to prevent deployment race conditions (#92)
Without concurrency groups, multiple workflow runs triggered by rapid
successive pushes can overlap. For the merge workflow, a slower build
of an older commit could finish after a newer one, deploying stale code
to mlab-oti. For the PR workflow, redundant builds waste CI minutes.
- Merge workflow: uses github.ref (the main branch) so only the latest
push to main proceeds to production deployment.
- PR workflow: uses github.head_ref (the PR branch name) with a
fallback to github.run_id, so only the latest push to a given PR
branch triggers a preview deployment. cancel-in-progress: true
cancels any in-flight run when a newer one starts.1 parent 4b9602a commit a4ff8bc
File tree
2 files changed
+8
-0
lines changed- .github/workflows
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
0 commit comments