Skip to content

Docker: add optional test input - #5

Closed
f3l1x wants to merge 1 commit into
masterfrom
claude/exciting-feynman-p0jaf4
Closed

f3l1x wants to merge 1 commit into
masterfrom
claude/exciting-feynman-p0jaf4

Conversation

@f3l1x

@f3l1x f3l1x commented Sep 29, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds an optional test input to the shared Docker workflow. The caller gives a shell command that tests the image before the push.

When test is set, the workflow does these steps:

  1. It builds the image for linux/amd64 with load: true, so that the image is in the local Docker.
  2. It runs the command from the repository root. The command gets IMAGE=<image>:<tag>.
  3. Then it does the normal multi-arch build and push. This build uses the same Buildx builder, so the amd64 layers come from the cache.

If the test fails, the image is not pushed. Callers that do not set test see no change.

Example

uses: dockette/.github/.github/workflows/docker.yml@master
with:
  image: "dockette/ci"
  tag: "${{ matrix.item }}"
  context: "${{ matrix.item }}"
  test: .scripts/test.sh ${{ matrix.item }} "$IMAGE"

The first caller is dockette/ci, in a PR that is stacked on dockette/ci#18.

Checks

  • actionlint passes.

馃 Generated with Claude Code

https://claude.ai/code/session_01VSKw7jY45nUJWQxWpvjm82


Generated by Claude Code

The new "test" input is a shell command that tests the image before the
push. When it is set, the workflow builds the image for linux/amd64,
loads it into Docker and runs the command with IMAGE=image:tag. The
multi-arch build that follows uses the same builder cache.

Callers without "test" are not changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSKw7jY45nUJWQxWpvjm82
@f3l1x f3l1x closed this Sep 30, 2026
f3l1x added a commit to dockette/ci that referenced this pull request Sep 30, 2026
The "test" input of the shared dockette/.github workflow is not
planned (dockette/.github#5 is closed). Run the tests in this repo:
the Test job builds each image for linux/amd64, loads it and runs
.scripts/test.sh. The Build job uses the shared workflow from @master
again and pushes only after all tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSKw7jY45nUJWQxWpvjm82
@f3l1x
f3l1x deleted the claude/exciting-feynman-p0jaf4 branch October 1, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant