Skip to content

Build and publish images via GitHub Actions#2

Merged
tarzan merged 1 commit into
masterfrom
add-publish-workflow
May 24, 2026
Merged

Build and publish images via GitHub Actions#2
tarzan merged 1 commit into
masterfrom
add-publish-workflow

Conversation

@tarzan
Copy link
Copy Markdown
Member

@tarzan tarzan commented May 24, 2026

Summary

Adds .github/workflows/publish.yml that:

  • Auto-detects every top-level directory containing a Dockerfile
  • Builds each on PR (no push) so Dockerfile regressions surface before merge
  • On merge to master, pushes each as defactosoftware/elixir:<dir-name>
  • Caches layers via type=gha per-version so subsequent builds are fast

Also updates the README: drops the Docker Desktop ceremony, documents the new flow, and lists the two repo secrets the workflow needs.

Required setup before merging

Add two repo secrets in Settings → Secrets and variables → Actions:

Without these, the publish step on merge to master will fail at login. PR builds don't need them — they only build (no push).

Why now

We're adding 1.20.0-rc.6 (#1) and the detroit CI is blocked on that image being on Docker Hub. Wiring up CI here means future version bumps are just PR → merge, no manual docker build/docker push dance.

Notes / non-goals

  • Builds linux/amd64 only — matches the existing manual flow. Adding linux/arm64 for Apple Silicon devcontainer users would be a one-line change if wanted later.
  • Doesn't update the bullet list at the top of the README that still mentions ImageMagick (stale since 1.18.1 removed it) — leaving that for a follow-up to keep this PR focused.

Test plan

  • Add the two Docker Hub secrets
  • PR check runs and builds both 1.18.0 and 1.18.1 (build-only, no push)
  • After merge, master run publishes defactosoftware/elixir:1.18.0 and defactosoftware/elixir:1.18.1 (re-pushes existing tags as a no-op smoke test)
  • Merging Add Elixir 1.20.0-rc.6 #1 next then triggers a publish of 1.20.0-rc.6

🤖 Generated with Claude Code

Adds a workflow that auto-detects every version directory containing a
Dockerfile, builds it on every PR (to catch Dockerfile regressions
before merge), and publishes to Docker Hub on merge to master.

Removes the manual Docker Desktop ceremony from the README and
documents the two repo secrets the workflow needs (DOCKERHUB_USERNAME
and DOCKERHUB_TOKEN).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tarzan tarzan merged commit a2c21ea into master May 24, 2026
3 checks passed
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