Skip to content

fix(ci): branch-tip check fails on private repos, freezing :latest - #51

Merged
saheljalal merged 1 commit into
mainfrom
fix/tip-check-private-repos
Sep 15, 2026
Merged

saheljalal merged 1 commit into
mainfrom
fix/tip-check-private-repos

Conversation

@saheljalal

Copy link
Copy Markdown
Collaborator

Summary

  • git ls-remote without credentials returns nothing for private repos on GitHub-hosted runners β†’ tip="" β‰  SHA β†’ is_tip=false β†’ :latest never moves
  • Replace with gh api repos/{repo}/branches/{branch} --jq .commit.sha authenticated via GH_TOKEN: github.token
  • Impact: consumers running :latest (doctopus prod via Dokploy) silently froze on old images while CI stayed green

Evidence (doctopus, run 35033256421)

##[notice]branch main has moved to ; publishing sha tag only for bf36e50c...

Empty tip β€” ls-remote returned zero refs for the private repo.

Test plan

  • Merge, then push any commit to a consumer repo's main β†’ merge job log should show is_tip=true and -t ...:latest
  • Verify GHCR latest index digest changes and both arch legs present

Anonymous git ls-remote returns nothing for private repos from
GitHub-hosted runners, silently forcing is_tip=false and freezing
the :latest tag. Query the GitHub API with the job token instead.

Observed: doctopus prod frozen on 2026-09-08 image for 7 days while
CI stayed green (sha tags published, latest never moved).
@saheljalal
saheljalal merged commit 458104a into main Sep 15, 2026
1 check passed
@saheljalal
saheljalal deleted the fix/tip-check-private-repos branch September 15, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant