ci: fix prune self-exclusion quote so the just-built ci-<sha> is never deleted #135

Merged
fastie81 merged 1 commit from fix/prune-quote into main 2026-09-06 10:31:47 +12:00
Owner

Root cause of the recurring 'ci-: not found' deploy failures:

The prune step in the build job used single quotes:

grep -v '^ci-${GITHUB_SHA}$'

so ${GITHUB_SHA} was never expanded and the just-built image tag was NEVER excluded from pruning. Because ci- tags sort alphabetically and the current SHA begins with a digit ('1' < 'c'), the freshly-pushed ci- was the FIRST candidate deleted when keeping the latest 5 -- so the deploy job (which depends on build) pulled an image that the same run's prune had just destroyed.

Fix: change to double quotes so the SHA expands and the just-pushed image is excluded:

grep -v "^ci-${GITHUB_SHA}$"

Verified green on this branch: test 2m11s, lint 1m10s, build 2m0s.

Root cause of the recurring 'ci-<sha>: not found' deploy failures: The prune step in the build job used single quotes: grep -v '^ci-${GITHUB_SHA}$' so \${GITHUB_SHA} was never expanded and the just-built image tag was NEVER excluded from pruning. Because ci-<sha> tags sort alphabetically and the current SHA begins with a digit ('1' < 'c'), the freshly-pushed ci-<sha> was the FIRST candidate deleted when keeping the latest 5 -- so the deploy job (which depends on build) pulled an image that the same run's prune had just destroyed. Fix: change to double quotes so the SHA expands and the just-pushed image is excluded: grep -v "^ci-${GITHUB_SHA}$" Verified green on this branch: test 2m11s, lint 1m10s, build 2m0s.
ci: fix prune self-exclusion quote so ci-<sha> is never deleted
All checks were successful
CI / test (push) Successful in 2m11s
CI / lint-frontend (push) Successful in 1m10s
CI / build (push) Successful in 2m0s
CI / deploy (push) Has been skipped
80c5a01583
The prune step used single quotes around '^ci-${GITHUB_SHA}$', so the
current build's SHA was NEVER excluded from pruning. Because the just-built
ci-<sha> tag sorts first alphabetically (1 < c), it was the first to be
deleted when keeping the latest 5, causing the deploy job to fail with
'ci-<sha>: not found'. Changed to double quotes so ${GITHUB_SHA} expands and
the just-pushed image is protected from pruning.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fastie81/honbu-manager!135
No description provided.