Repository navigation
ci(workflows): v1.4.0 — image.yml takes build-args, so an image can know its commit [FACT-2010] - #7
Conversation
…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>
practical-bot
left a comment
There was a problem hiding this comment.
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.ymltakesbuild-args... passed straight todocker/build-push-action'sbuild-args.” PASS —node --test scripts/*.test.mjscompleted with31tests,31passed,0failed; 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 existingnpmrcsecret remains separate frombuild-args. - “Release
v1.4.0... fallback refs ... bumped tov1.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.mjspins the input ... and that the build step passes it.” PASS — test 31 passes and assertsrequired: 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 run44200875190also passedguard-testson this head. - “
actionlint: 5 findings ...mainhas the same 5.” UNVERIFIED —actionlintis 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
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.ymlhad no way to pass the caller's${{ github.sha }}into the Dockerfile.What changed
image.ymltakesbuild-args(string, default empty, oneKEY=valueper line), passed straight todocker/build-push-action'sbuild-args. An empty value is what the action already received, so every existing caller is unchanged.npmrc(a build secret), never here.v1.4.0: README tag row, abuild-argsexample (BUILD_SHA=${{ github.sha }}, withARG BUILD_SHA/ENV BUILD_SHA=$BUILD_SHAin the Dockerfile), the quick-start pin, and the script fallback refs incoolify-deploy.ymlandpr-guard.yml(the README-newest test pins them).scripts/workflows.test.mjspins the input (optional, string, empty default) and that the build step passes it.After merge this needs the tag
v1.4.0on the merge commit.Verification
node --test scripts/*.test.mjs:# tests 31/# pass 31/# fail 0(the new test included).actionlint: 5 findings, alljob.workflow_sha/job.workflow_repository, which actionlint does not know yet.mainhas the same 5; no new finding.Refs: FACT-2010
🤖 Generated with Claude Code