Skip to content

Publish only from main through the docker-hub environment; tag verified digests - #16

Merged
qisthidev merged 1 commit into
mainfrom
k3/publish-gate-and-digest-scan
Nov 8, 2026
Merged

qisthidev merged 1 commit into
mainfrom
k3/publish-gate-and-digest-scan

Conversation

@qisthidev

Copy link
Copy Markdown
Member

Draft: waiting for a maintainer decision. This changes the release process.

Who can publish

  • publish-docker.yml: a workflow_dispatch run publishes only when started from main. A concurrency group per ref, without cancelling, stops two publish runs from overlapping.
  • docker-hub-readme.yml: runs only on main.
  • The jobs that log in to Docker Hub use environment: docker-hub: the runtime/dev publish job, the CI image build and merge jobs, and the README sync.

What gets published

  • The runtime image is pushed by digest, without tags. The workflow then pulls that digest for amd64 and arm64, runs the smoke test on amd64, and runs the Trivy gate on both. imagetools create moves the tags only after those pass.
  • The dev image is built FROM laravoltdev/image@<runtime digest> rather than a moving tag. It is pushed by digest, scanned for both architectures, and then tagged.
  • This replaces the earlier pattern, where a separate amd64 test build was scanned and a rebuilt image was pushed.
  • README "Security" describes the new order.

Before merging, an owner has to do this in repository settings:

  1. Create the docker-hub environment with required reviewers, and restrict it to main and release tags.
  2. Move DOCKER_HUB_USERNAME, DOCKER_HUB_ACCESS_TOKEN and DOCKER_HUB_README_TOKEN into that environment.
  3. Check the Docker Hub token scopes.

Not tested here: the publish workflow does not run on pull requests, and the audit host has no Docker. The first run after merge should be a manual run from main, watched closely. A failed check leaves only an untagged digest behind and no tag moves. The CI image (php8.5-ci) still has no Trivy step; that is a follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_016ZbncuXneGAhsgTaizfjVi

…ed digests

- Manual runs of the publish workflow are limited to main, publish
  runs do not overlap, and the README sync runs only on main.
- Jobs that use Docker Hub secrets run in the docker-hub environment.
- Runtime and dev images are pushed by digest; that digest is smoke
  tested (amd64) and Trivy-scanned (amd64 and arm64) before any tag is
  moved. The dev image builds on the verified runtime digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZbncuXneGAhsgTaizfjVi
@qisthidev
qisthidev marked this pull request as ready for review November 8, 2026 02:58
@qisthidev
qisthidev merged commit a8c160c into main Nov 8, 2026
7 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