Repository navigation
Publish a multi-arch Docker image to ghcr.io with every release - #27
Merged
Merged
Conversation
New workflow .github/workflows/publish.yml: - On a release tag (v1.2.3): checks that the tag, version.py and a dated CHANGELOG entry agree, builds the image, runs a smoke test (uid 1000, imports, health check), then builds for linux/amd64 and linux/arm64 and pushes ghcr.io/wessec/tesla_mtc with the tags 1.2.3, 1.2, 1 and latest. The major tag and latest only move for the newest release, so publishing an older release again never moves them backwards. - By hand (workflow_dispatch) for an existing tag, for example to publish 1.2.1, which predates this workflow, or to pick up base image updates. - In pull requests that touch the image: the same build without pushing, so arm64 breakage (for example from a Dependabot update) shows up there. Uses the built-in GITHUB_TOKEN (packages: write), no secrets. OCI labels link the package to this repository. README: a Releasing section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What
A Publish image workflow that builds tesla_mtc for amd64 and arm64 and publishes it to
ghcr.io/wessec/tesla_mtc, so users no longer have to build the image themselves. No code or documentation changes for users yet; those follow in a separate pull request once the image is available.When it runs (
.github/workflows/publish.yml)v1.2.3):version.pyand a datedCHANGELOG.mdentry agree;linux/amd64andlinux/arm64and pushes the tags1.2.3,1.2,1andlatest.Dockerfile,.dockerignore,requirements.txtor this workflow: the same build without logging in or pushing. arm64 problems, for example from a Dependabot update of the base image, show up before merging. This pull request triggers that build itself.Details
1andlatestonly move for the newest release tag. Publishing an older release again never moves them backwards.GITHUB_TOKENwithpackages: write; no secrets. The OCI labels (org.opencontainers.image.source) link the package to this repository.provenance: false: a plain multi-platform image without attestation entries, which some NAS interfaces list as an "unknown" platform.After merging
v1.2.1.docker-compose.example.ymland the setup guide to the image.Checked locally
v1.2.1passes and is the newest. An older tag at its own commit passes but does not move1/latest. A wrong version or a malformed tag is rejected.v1.2.1.🤖 Generated with Claude Code