Skip to content

Commit 80bfb99

Browse files
committed
release-watch: trigger docker/release via workflow_dispatch (no PAT needed)
A tag pushed with the built-in GITHUB_TOKEN does not trigger the on:push:tags workflows (GitHub's recursion guard), so the watcher's auto-bump tag would land but docker.yml/release.yml would never run and the image would silently never republish. workflow_dispatch is the documented exception GITHUB_TOKEN is allowed to trigger, so after tagging, the watcher now explicitly runs docker.yml + release.yml against the new tag ref (gh workflow run --ref v${new}). Both derive their version from GITHUB_REF_NAME, so the dispatched build produces the identical X.Y.Z + latest image tags a native tag-push would. Adds actions:write for the dispatch. No PAT or extra secret required (GitHub provides no API to mint one anyway).
1 parent 5ab4eac commit 80bfb99

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/headroom-release-watch.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818

1919
permissions:
2020
contents: write # commit the bump + push the tag
21+
actions: write # `gh workflow run` the publish workflows (workflow_dispatch)
2122

2223
env:
2324
UPSTREAM: headroomlabs-ai/headroom
@@ -79,5 +80,12 @@ jobs:
7980
the ml-feature gate. Built + tested green (lexical/no-ml). Republishing the hook image."
8081
git push origin HEAD:main
8182
git tag "v${new}" -m "headroom-hook v${new} — built on headroom ${LATEST}"
82-
git push origin "v${new}" # -> docker.yml + release.yml republish
83+
git push origin "v${new}"
84+
# A tag pushed with the built-in GITHUB_TOKEN does NOT trigger the `on: push: tags: v*`
85+
# workflows (GitHub's recursion guard). workflow_dispatch is the documented EXCEPTION —
86+
# GITHUB_TOKEN CAN trigger it — so kick docker.yml + release.yml explicitly against the new
87+
# tag ref. Both derive their version from GITHUB_REF_NAME, so `--ref v${new}` yields the
88+
# identical `X.Y.Z` + `latest` image tags a native tag-push would (no PAT/secret needed).
89+
gh workflow run docker.yml --ref "v${new}"
90+
gh workflow run release.yml --ref "v${new}"
8391
echo "::notice::republished headroom-hook v${new} built on headroom ${LATEST}"

0 commit comments

Comments
 (0)