Skip to content

feat: use pre-built Docker image from GHCR#122

Open
jankal wants to merge 1 commit intomittwald:mainfrom
nuonic-digital:feat/prebuilt-docker-image
Open

feat: use pre-built Docker image from GHCR#122
jankal wants to merge 1 commit intomittwald:mainfrom
nuonic-digital:feat/prebuilt-docker-image

Conversation

@jankal
Copy link

@jankal jankal commented Feb 26, 2026

Summary

  • Add a release workflow (.github/workflows/release.yml) that builds and pushes the action's Docker image to GHCR on every published GitHub release
  • Update action.yaml to pull the pre-built image (docker://ghcr.io/mittwald/deploy-container-action:v1) instead of building from the Dockerfile

This reduces action startup time from ~30–60s (Go compile on every run) to ~2–5s (pull a ~20 MB Alpine image).

How it works

On every published release (e.g. v1.0.2), the workflow builds the Docker image and pushes it with semver tags:

Tag Example Purpose
v{{major}} v1 Rolling major — used by action.yaml
v{{major}}.{{minor}} v1.0 Rolling minor
v{{version}} v1.0.2 Exact version
sha-{{sha}} sha-abc1234 Commit pinning

Manual steps required after merge

  1. Create a GitHub release to trigger the first image build
  2. Make the GHCR package public so users can pull without authentication:
  3. Force-update the v1 git tag to include the new action.yaml:
    git tag -fa v1 -m "Release v1 – use pre-built image"
    git push origin v1 --force

Test plan

  • Merge this PR
  • Create a release (e.g. v1.0.3) and verify the image appears at ghcr.io/mittwald/deploy-container-action
  • Make the package public
  • Update the v1 tag
  • Test the action in a consumer workflow and confirm it pulls the pre-built image instead of building

🤖 Generated with Claude Code

Add a release workflow that builds and pushes the action's Docker image
to GHCR on every published release. Update action.yaml to reference the
pre-built image instead of the Dockerfile, reducing action startup from
~30-60s to ~2-5s for users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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