Skip to content

Build and push tag-named images on git tag push#3

Merged
nikicat merged 1 commit into
masterfrom
ci/tag-trigger
Jun 23, 2026
Merged

Build and push tag-named images on git tag push#3
nikicat merged 1 commit into
masterfrom
ci/tag-trigger

Conversation

@nikicat

@nikicat nikicat commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Adds a git-tag trigger so releases get versioned images.

Behavior

  • Tag push (e.g. v1.2.3): builds both arches and pushes
    • ghcr.io/nikicat/tg-echo-service:v1.2.3 (multi-arch manifest) + :v1.2.3-amd64 / :v1.2.3-arm64
    • same for tg-echo-service-tools
  • master push: unchanged user-facing result — :latest (now built via :latest-amd64/:latest-arm64 intermediates)
  • PR / manual: build-only, no push (unchanged)

How

  • push.tags: ['*'] added to the triggers.
  • A single VERSION env — the git tag on a tag push, else latest — drives both the per-arch tags ($VERSION-<arch>) and the manifest (:$VERSION), so master and tags share one path.
  • Push conditions simplified to event_name == 'push' (covers master branch + tags); PR/manual remain build-only.

Notes

  • Tag names must be valid OCI tags (the '*' filter excludes slashes; clean vX.Y.Z tags are fine).
  • Done as a PR to avoid cancelling the in-flight master run (a direct master push shares its concurrency group).
  • The tag-specific path is exercised by actually pushing a tag after merge; the PR run only re-validates the build.

🤖 Generated with Claude Code

Trigger the workflow on tag pushes and publish the image under the tag name:
pushing e.g. v1.2.3 produces ghcr.io/<repo>:v1.2.3 (multi-arch manifest) plus
the per-arch v1.2.3-amd64 / v1.2.3-arm64 tags, and the same for the tools image.

A single VERSION (the git tag on a tag push, otherwise "latest" for master)
drives both the per-arch build tags and the manifest, so master and tags share
one code path. Push conditions are simplified to event_name == 'push', which
covers both the master branch and tags; PR/manual runs stay build-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nikicat
nikicat merged commit bbcd944 into master Jun 23, 2026
3 checks passed
@nikicat
nikicat deleted the ci/tag-trigger branch June 23, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant