Skip to content

Add: reusable docker build/test/push workflow with keyless cosign signing - #5

Merged
gambe94 merged 3 commits into
mainfrom
feat/docker-build-test-push-reusable
Jul 12, 2026
Merged

Add: reusable docker build/test/push workflow with keyless cosign signing#5
gambe94 merged 3 commits into
mainfrom
feat/docker-build-test-push-reusable

Conversation

@gambe94

@gambe94 gambe94 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements sf-docker-images/docs/reusable-workflow-migration-design.md (§4): the per-image build → test → push chain as a workflow_call workflow. One invocation per image; callers fan out with a matrix and keep repo-specific release logic local.

Deliberate changes vs. the source workflow in sf-docker-images:

  • Keyless cosign signing of the pushed manifest-list digest (GitHub OIDC → Fulcio → Rekor); push job requests id-token: write
  • Two-tag scheme: {{version}} + latest only (rolling major/minor tags dropped, per design decision)
  • Per-image GHA cache scope (scope=<image-name>) — parallel matrix builds no longer thrash a shared cache
  • version-report-<image> artifact: Node/npm/SF CLI/user-plugin versions read from the built image, for the caller's release notes
  • Docker Hub README sync behind an image-description input (parity with the live workflow)
  • trivy-version input from the design doc dropped — uses: refs cannot take expressions; trivy-action is hard-pinned
  • All third-party actions SHA-pinned with # vX.Y.Z comments

Verification

  • npm run all green, actionlint clean
  • version-report jq verified against a locally built sf-ci:test (yields exactly the user-installed plugins)
  • End-to-end exercise happens via the sf-docker-images caller PR (references this branch until merge)

⚠️ The workflow file path is part of the cosign certificate identity — do not rename/move it.

🤖 Generated with Claude Code

gambe94 and others added 3 commits July 12, 2026 14:26
Extracts the per-image build → test → push chain from
sf-docker-images/build-and-push.yml into a workflow_call workflow, per
sf-docker-images/docs/reusable-workflow-migration-design.md. One invocation
per image; callers fan out with a matrix and keep repo-specific release
logic. Changes vs the source workflow: per-image gha cache scope, two-tag
scheme ({{version}} + latest, rolling major/minor dropped), version-report
artifact for release-note aggregation, README sync behind an
image-description input, all third-party actions SHA-pinned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The push job now signs the pushed manifest-list digest with cosign
(keyless, GitHub OIDC via Fulcio, recorded in Rekor). Requires
id-token: write from the calling job. The certificate identity is this
workflow's job_workflow_ref — renaming/moving this file invalidates
downstream verify commands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gambe94
gambe94 merged commit 56820de into main Jul 12, 2026
1 check passed
@gambe94
gambe94 deleted the feat/docker-build-test-push-reusable branch July 12, 2026 12:58
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