Publish release images by dispatch, built from the tag - #823
Merged
Conversation
Publishing the 9.7.0 GitHub Release produced no workflow run at all - not a failed one, nothing - and the images were never pushed. GitHub runs a release event's workflow as it exists at the tag, not as it exists on the default branch. The v9.7.0 tag was cut on 12 Aug and the release trigger landed on main the next day, so GitHub read the tag's copy of publish-docker.yaml, found no release trigger, and correctly did nothing. That is not a one-off. The tag is cut at `prepare` and the Release is published at `vote-passed`, at least 72 hours later, so anything changed in this workflow inside that window silently does not apply to the release in flight. The window reopens every release; 9.7.0 was just the first time something landed in it. Drop the release trigger and dispatch instead. `github-release` creates the Release and then runs `gh workflow run publish-docker.yaml -f version=x.y.z`, so publishing stays automatic rather than becoming something to remember, and there is one path rather than two that could both fire. A dispatch always runs the workflow from the default branch, which makes what publishes a function of main rather than of when the tag happened to be cut. If the dispatch fails the Release is already out, so the script warns with the retry commands instead of aborting. Everything the run acts on still comes from the tag rather than from a branch or a timestamp. The tree is checked out at refs/tags/vx.y.z, so Dockerfile and Makefile - which decide what the image actually is - come from the released source instead of from whatever main looks like now; without that a dispatch would have built with main's copies. The agent package remains the sha512- and signature-verified tarball from dist/release, and the image tags come from the version. A leading v on the input is tolerated, and leaving it blank builds a development image exactly as a push to main does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wu-sheng
force-pushed
the
fix/publish-docker-dispatch
branch
from
August 14, 2026 05:37
d03c00d to
2a13645
Compare
mrproliu
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Publishing the 9.7.0 GitHub Release produced no workflow run at all — not a failed one,
nothing — and the images were never pushed to Docker Hub.
For a
releaseevent GitHub runs the workflow as it exists at the tag, not as it existson the default branch:
#821is not an ancestor of the tag, so GitHub readv9.7.0's copy of the workflow, foundno
releasetrigger, and correctly did nothing.This is not a one-off. The tag is cut at
prepare; the Release is published atvote-passed, at least 72 hours later. Any change topublish-docker.yamlmerged inthat window silently does not apply to the release in flight. The window reopens every
release — 9.7.0 was simply the first time something landed inside it.
Confirmed against
apache/skywalking, where the same trigger works because it was added in2023, long before any current tag:
Fix
Remove the
release:trigger and dispatch instead.github-releasenow creates the Releaseand then runs:
gh workflow run publish-docker.yaml -f version="${version}"so publishing stays automatic rather than becoming something to remember. A dispatch always
runs the workflow from the default branch, which makes what publishes a function of
mainrather than of when the tag happened to be cut. If the dispatch fails the Release is already
published, so the script warns with retry commands rather than aborting.
Everything the run acts on comes from the tag, not from a branch or a timestamp:
git checkout refs/tags/vx.y.z— Dockerfile and Makefile from the released sourcedist/release/<version>tarball, sha512 + GPG verifiedThe tag checkout matters: Dockerfile and Makefile decide what the image actually is, and
previously a dispatch would have built with
main's copies.9.7.0refs/tags/v9.7.0.../java-agent/9.7.0:9.7.0-alpinev9.7.0refs/tags/v9.7.0.../java-agent/9.7.0:9.7.0-alpineLeaving the input blank builds a development image, matching a push to
main.Recovering 9.7.0
Once this merges: Actions → publish-docker → Run workflow, enter
9.7.0. Sameverification, on CI, with a record of what ran — better than pushing from a workstation.
Testing
bash -nclean;envused only in step-levelif:, where thatcontext exists.
dist/releaseURLs verified live afterpromote(.tgz,.asc,.sha512all HTTP 200;dist/devnow 404).refs/tags/v9.7.0resolves, so the tag checkout will succeed.9.7.0andv9.7.0.🤖 Generated with Claude Code