build-push: drop the empty ${{ }} that silenced the registry login #155
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#155
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/build-push-empty-expression"
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?
Forgejo evaluates
${{ }}expressions inside a step'srun:script, comments included. An empty expression is a parse error, and the runner drops the step — no log line, no error, no failed status. The login step never ran, so everydocker pushwent out anonymous.The registry then answers
unauthorized: reqPackageAccess, which reads exactly like a revoked token or a missing scope. It is neither.Isolated on one branch, one variable, back to back:
${{ }}Login Succeededin logLogin Succeededat line 487,sha-df409f88b3fdpublishedRuled out first, so nobody repeats it: the token, its scope, and repo-vs-organization placement. Pushes to
jinemi/thermograph/*succeed by hand from vps1 and from the runner host, with matching and mismatched usernames, and the run log showsREGISTRY_TOKEN:***arriving in the job environment — org-level secrets resolve fine.Separately fixed out of band (same root cause, PR #151 moving ROOT_URL to dev.jinemi.com): the registry's bearer realm became
https://dev.jinemi.com/v2/token, a name that only routes publicly, wherecaddy-git.confdeliberately 403s/v2/*. Mesh pins added to/etc/hostson vps1, vps2 and the runner host, and--add-host=dev.jinemi.com:10.10.0.2alongside the existinggit.thermograph.orgentry in the runner'sconfig.yaml. Those pins are manual host state — nothing in the repo writes them.Forgejo evaluates ${{ }} expressions inside a step's `run:` script, comments included. An EMPTY expression is a parse error, and the runner's response is to drop the step -- no log line, no error, no failed status. The login step simply never ran, so every subsequent `docker push` went out anonymous. The registry then answers `unauthorized: reqPackageAccess` (or, depending on the client path, `no basic auth credentials`), which reads exactly like a revoked token or a missing scope. It is neither. Both are downstream of a comment. Isolated on one branch, one variable, back to back: * empty expression present -> both legs fail, no `Login Succeeded` in the log * empty expression removed -> both legs pass, `Login Succeeded` present, sha-df409f88b3fd published for backend and frontend Nothing was wrong with the credential. The token, its scope and whether it sat at repo or organization level were all ruled out first: pushes to jinemi/thermograph/* succeed by hand from vps1 and from the runner host, with matching and mismatched usernames, and the run log shows REGISTRY_TOKEN arriving in the job environment. Do not write a bare ${{ }} in a run block, in a comment or otherwise.