Skip to content

ci: publish test/docker/* images to the GitHub Container Registry - #445

Merged
oxr463 merged 2 commits into
masterfrom
publish-docker-test-images
Sep 21, 2026
Merged

oxr463 merged 2 commits into
masterfrom
publish-docker-test-images

Conversation

@oxr463

@oxr463 oxr463 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Every `test/docker/*/Dockerfile` FROMs a `ghcr.io/proot-me/proot:` image, but nothing in this repo actually builds or pushes them, confirmed by grepping the whole `.github/workflows/` tree for `ghcr.io`/`docker/login-action`/`docker/build-push-action` before writing this. They only ever existed if someone built and pushed them manually.

Three jobs, one per distro (alpine, centos, debian), run in parallel. Each builds its own `base -> x86_64 -> {gcc,clang}` chain sequentially within the job, so every `FROM` resolves against the image built earlier in the same job's Docker daemon, no pull or tag substitution needed. Triggers on push to `master` when `test/docker/**` or the tag-parsing script changes, plus `workflow_dispatch` for a manual rebuild.

Tags come from `util/parse-docker-tag.awk`, the same script `test/test-docker.sh` already uses for local builds, rather than reimplementing that logic in YAML: one source of truth for the naming scheme. Verified its output directly against every Dockerfile path this workflow actually builds (not just the docstring's example).

Verified the build chain mechanism too, not just the YAML: built `debian` and `debian-x86_64` locally with the real `ghcr.io/proot-me/proot:*` tag strings (not substituted local ones like #444 used) and confirmed the `x86_64` layer's `FROM` resolved against the locally-built base with no pull needed, exactly like this workflow's sequential steps will. All three full distro chains (base through both compiler variants) were already verified end-to-end while working on #444.

No third-party GitHub Actions added; uses plain `docker login`/`build`/`push` CLI commands, matching this repo's existing preference for minimal external action dependencies (only `actions/checkout` is used anywhere else in this repo's workflows).

Every test/docker/*/Dockerfile FROMs a ghcr.io/proot-me/proot:<tag>
image, but nothing in this repo builds or pushes them. They only
existed if someone built and pushed manually.

Three jobs, one per distro, run in parallel; each builds its own
base -> x86_64 -> {gcc,clang} chain sequentially so every FROM
resolves against the image built earlier in the same job, no pull or
substitution needed. Triggers on push to master when test/docker/**
or the tag-parsing script changes, plus workflow_dispatch for a
manual rebuild.

Tags come from util/parse-docker-tag.awk, the same script
test/test-docker.sh already uses for local builds, rather than
reimplementing that logic in YAML. Verified its output directly
against every Dockerfile path this workflow builds, and verified the
build chain itself: built debian and debian-x86_64 locally with the
real ghcr.io/proot-me/proot:* tag strings (not substituted local
ones) and confirmed the x86_64 layer's FROM resolved against the
locally-built base with no pull needed, exactly like this workflow's
sequential steps will. All three full distro chains were already
verified end-to-end for #444.
Comment thread .github/workflows/docker-images.yml Fixed
SonarCloud (S8233): least-privilege hardening for GitHub Actions.
Every job here happens to need packages: write, but declaring it at
the workflow level applies it to any job added later too, whether or
not that job actually needs it.
@sonarqubecloud

Copy link
Copy Markdown

@oxr463
oxr463 merged commit 2265984 into master Sep 21, 2026
11 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.

2 participants