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:
sam committed 2026-09-02 00:14:57 +10:00
1 parent 42bcbc7872
commit 155e20af39
1 file changed
+7 -1
+7 -1
View File
@@ -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: