fix: A rejected Docker Hub token fails the release it was meant not to #50
Labels
No labels
priority/P0
priority/P1
priority/P2
priority/P3
size/L
size/M
size/S
size/XL
size/XS
state/done
state/in-progress
state/in-review
state/needs-refinement
state/ready
type/bug
type/chore
type/feature
type/refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
amtronics/platform-actions#50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
templates/release.yml'sLog in to Docker Hubstep (added in #37) is built on an explicit principle, stated in its own comment: a missing token must not stop a release, which is why it uses a hand-rolleddocker loginrather thandocker/login-action— the latter fails a job on an empty password.It only honours that principle for a token that is absent. A token that is present and rejected — expired, revoked, or rotated — fails the step, and
publishwith it, underset -euo pipefail.Driven with a stub
dockeron an otherwise emptyPATH:An expired token is the more likely future state than a missing one: tokens are registered once and then quietly age out, and nobody learns it happened until a release breaks. The failure is strictly avoidable — an anonymous pull is the documented fallback and still works when a credential is stale.
It is latent today because the secrets are not registered anywhere yet (the open half of #37), so every release takes the warn branch. It arrives the moment they are, which is the argument for closing it before the first broken release rather than after.
Found in review of
ahmad/portfolio#76, the first repository of #42. The step there is byte-identical to the template, so every copy inherits this — which is why it is fixed here first rather than in any consumer.Scope
templates/release.ymltreating a failed login the same as a missing one — warn and continue anonymously.Acceptance criteria
dockeris never invoked, as today.