ci(deploy): key concurrency group on commit SHA, not ref
git push --follow-tags pushes main plus both archied/v* and archie/v* tags in one operation, all pointing at the same commit. on.push matches branches and tags, so every release push fired three identical deploy runs -- observed just now: archied/v1.19.7, archie/v1.19.7, and main all running in parallel from the same commit. The ref-keyed concurrency group added earlier couldn't see these as the same work since github.ref differs per trigger. Key on github.sha instead so all three collapse into one.
This commit is contained in:
1 parent
404e7c1560
commit
f68f60e713
1 file changed
+7
-1
@@ -14,8 +14,14 @@ on:
|
||||
# three deploys racing in parallel for the same runner capacity. Only the
|
||||
# last one's images matter (both jobs push :latest), so cancel a
|
||||
# superseded run rather than let it fight for resources it can't use.
|
||||
#
|
||||
# Keyed on the commit, not github.ref: `git push --follow-tags` pushes
|
||||
# main plus both archied/v* and archie/v* tags in one go, and all three
|
||||
# refs point at the same commit -- on.push matches branches and tags
|
||||
# both, so a single release push otherwise fires three redundant builds
|
||||
# of identical content that a ref-keyed group can't see as the same work.
|
||||
concurrency:
|
||||
group: deploy-${{ github.ref }}
|
||||
group: deploy-${{ github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
|
||||
Reference in new issue
Block a user