Skip to content

Commit e9671ab

Browse files
authored
fix(framework): authenticate the Actions run-branch push explicitly (#1088)
The Push the run branch step (#1085) used a plain `git push origin`, which relies on the checkout's persisted credentials. The claude-code-action step runs its own git setup and leaves those unusable, so the push failed with "Authentication failed for github.com". Push through an x-access-token URL built from the workflow token instead. Refs #1085 #1087
1 parent 6b67aa4 commit e9671ab

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/framework-agent.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ jobs:
8282
env:
8383
RUN_BRANCH: ${{ inputs.branch }}
8484
DISPATCH_REF: ${{ github.ref_name }}
85+
# Authenticate the push explicitly. The agent step runs its own git setup and leaves
86+
# the checkout's persisted credentials unusable, so a plain `git push origin` fails
87+
# with "Authentication failed"; push through a tokenized URL instead.
88+
GH_PUSH_TOKEN: ${{ github.token }}
8589
run: |
8690
set -euo pipefail
8791
if [ -z "$RUN_BRANCH" ]; then echo "no run branch requested"; exit 0; fi
@@ -99,7 +103,7 @@ jobs:
99103
echo "no new commits; nothing to push"
100104
exit 0
101105
fi
102-
git push origin "HEAD:refs/heads/$RUN_BRANCH"
106+
git push "https://x-access-token:${GH_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:refs/heads/$RUN_BRANCH"
103107
echo "branch=$RUN_BRANCH" >> "$GITHUB_OUTPUT"
104108
105109
# The only REST-readable channel out of a run. `always()` so a failed turn still

0 commit comments

Comments
 (0)