Skip to content

ci(workflows): v1.4.0 — image.yml takes build-args, so an image can know its commit [FACT-2010] - #7

Merged
practical-bot merged 1 commit into
mainfrom
fact-2010-image-build-args
Nov 18, 2026
Merged

practical-bot merged 1 commit into
mainfrom
fact-2010-image-build-args

Conversation

@jcotillo

Copy link
Copy Markdown
Contributor

Why

A service should be able to say which commit it is running, for example on a version endpoint that a deploy check reads. The image is the only thing that knows, and image.yml had no way to pass the caller's ${{ github.sha }} into the Dockerfile.

What changed

  • image.yml takes build-args (string, default empty, one KEY=value per line), passed straight to docker/build-push-action's build-args. An empty value is what the action already received, so every existing caller is unchanged.
  • The input description and the README say build-args are recorded in image history: credentials go through npmrc (a build secret), never here.
  • Release v1.4.0: README tag row, a build-args example (BUILD_SHA=${{ github.sha }}, with ARG BUILD_SHA / ENV BUILD_SHA=$BUILD_SHA in the Dockerfile), the quick-start pin, and the script fallback refs in coolify-deploy.yml and pr-guard.yml (the README-newest test pins them).
  • scripts/workflows.test.mjs pins the input (optional, string, empty default) and that the build step passes it.

After merge this needs the tag v1.4.0 on the merge commit.

Verification

  • node --test scripts/*.test.mjs: # tests 31 / # pass 31 / # fail 0 (the new test included).
  • actionlint: 5 findings, all job.workflow_sha / job.workflow_repository, which actionlint does not know yet. main has the same 5; no new finding.

Refs: FACT-2010

🤖 Generated with Claude Code

…now its commit [FACT-2010]

image.yml gains an optional multiline build-args input (default empty),
passed to docker/build-push-action. A caller can now hand its Dockerfile
BUILD_SHA=${{ github.sha }} so the running container can report the
commit it was built from. Existing callers are unchanged.

Script fallback refs move to v1.4.0, the README gets the tag row and a
build-args example, and workflows.test.mjs pins the input and its wiring.

Refs: FACT-2010

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jcotillo jcotillo added the merge:queued Hand this PR to the factory merge queue label Nov 17, 2026

@practical-bot practical-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rework satisfies the newer FACT-2010 card scope: image.yml declares an optional string build-args input with an empty default and passes it to docker/build-push-action; the README documents the v1.4.0 release and safe BUILD_SHA example; both fallback refs are v1.4.0; and the focused test pins the input and wiring. Existing callers remain compatible because the default is empty.

Claim ledger:

  • “image.yml takes build-args ... passed straight to docker/build-push-action's build-args.” PASS — node --test scripts/*.test.mjs completed with 31 tests, 31 passed, 0 failed; the changed workflow and focused assertion both confirm the wiring.
  • “The input description and the README say build-args are recorded in image history ... credentials go through npmrc.” PASS — the changed workflow description and README contain those warnings, and the existing npmrc secret remains separate from build-args.
  • “Release v1.4.0 ... fallback refs ... bumped to v1.4.0.” PASS — README tag/example and both workflow fallback refs are present in the five-file diff; the existing newest-release test also passes.
  • “scripts/workflows.test.mjs pins the input ... and that the build step passes it.” PASS — test 31 passes and asserts required: false, type: string, default: "", and the action wiring.
  • “node --test scripts/*.test.mjs: ... 31 / 31 / 0.” PASS — the exact command completed locally with those counts; CI run 44200875190 also passed guard-tests on this head.
  • “actionlint: 5 findings ... main has the same 5.” UNVERIFIED — actionlint is not installed in this review workspace (command not found/unavailable), and the PR checks did not run actionlint; this is an environment limitation, not a PR finding.

CI check rows were read in full: guard / check passed and guard-tests passed on head 76afb90e898836cff193e581c1fbee6d998d0fa9. The repository has no package.json, so no package-declared lint/typecheck commands are available; the repository CI for this PR is the script test and guard workflow above.

REVIEW VERDICT: approve
REVIEWED DIFF: base=main files=5 lines=44

@practical-bot
practical-bot merged commit 4a7caf6 into main Nov 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge:queued Hand this PR to the factory merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants