Repository navigation
ci(docker): publish image from the release-please workflow - #13
Merged
Merged
Conversation
docker-publish.yml listened for `release: published`, but release-please creates releases with the default GITHUB_TOKEN, and events from that token don't trigger other workflows, so the image was never built. Move the build into release-please.yml as a job gated on the release-please job's `release_created` output, and check out the release tag. Use the bare `version` output for the image tags: the `watari-v` prefixed tag name isn't valid semver, so metadata-action would have dropped the version tags and pushed only `latest`. Co-Authored-By: lazytrek <352825308+lazytrek@users.noreply.github.com>
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
docker-publish.ymlhas never run. It listened forrelease: published, but release-please creates releases with the defaultGITHUB_TOKEN, and GitHub doesn't start other workflows from events made with that token. Merging the pending release PR (#7) would have createdwatari-v1.1.0without building an image or showing any error.The tags were broken too: release-please puts the component name in its tags (
watari-v1.1.0). That isn't valid semver, sodocker/metadata-action'stype=semverrules would have dropped the version tags and pushed onlylatest.Change
release-please.ymlas adocker-publishjob that runs after therelease-pleasejob, and only whenrelease_created == 'true'. Because it's in the same workflow, it needs no personal access token.tag_nameoutput) rather than the tip ofmain.versionoutput, so the image gets1.1.0,1.1andlatest.contents/pull-requests: write, Docker getscontents: readandpackages: write.docker-publish.yml.Testing
docker-publishjob runs and thatghcr.io/coko7/watarigets the1.1.0,1.1andlatesttags.Co-Authored-By: lazytrek 352825308+lazytrek@users.noreply.github.com