fix(ci): use CI_GITEA_TOKEN for cross-repo infra access in deploy jobs (CAR-1270) #35
Reference in New Issue
Block a user
Delete Branch "betty/car-1270-ci-gitea-token-main"
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?
Summary
Per CAR-1270, the auth
deploy-devanddeploy-uatjobs (migrated to the PR-bump pattern in CAR-1263) were still failing at the Checkout infra repo step withRepository not found. Root cause: those jobs authenticated the cross-repocartsnitch/infracheckout + infra PR API calls withsecrets.GITEA_TOKEN(the auto, repo-scoped Actions token), which has no read access to the privatecartsnitch/infrarepo.The working sibling
cartsnitch/cartsnitchusessecrets.CI_GITEA_TOKENfor these same operations. This PR makes auth match.Change
In
.gitea/workflows/ci.yml, only inside the two deploy jobs:token: ${{ secrets.GITEA_TOKEN }}→token: ${{ secrets.CI_GITEA_TOKEN }}Commit and push to infra (via PR)stepenv:block:GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}→CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}-H "Authorization: token ${GITEA_TOKEN}"curl calls →-H "Authorization: token ${CI_GITEA_TOKEN}"Untouched (by design)
build-and-pushjobpassword: ${{ secrets.REGISTRY_TOKEN }}— registry login, correct per CAR-1009git push origin "$BRANCH"line in the PR-bump step (the PR-bump pattern itself is correct; only the auth token name changes)Target branches
Separate PRs for
uatandmain(dev HEAD does not carry these deploy jobs yet, so not opened for dev).Co-Authored-By: Paperclip noreply@paperclip.ing
cc @cpfarhood