File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 contents : ' write'
3737 pull-requests : ' write'
3838 actions : ' write'
39+ workflows : ' write'
3940 steps :
4041 - name : ' Checkout'
4142 uses : ' actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
5253 - name : ' Install Script Dependencies'
5354 run : ' npm install yargs'
5455
55- - name : ' Generate GitHub App Token'
56- id : ' generate_token'
57- uses : ' actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b'
58- with :
59- app-id : ' ${{ secrets.APP_ID }}'
60- private-key : ' ${{ secrets.PRIVATE_KEY }}'
61- permission-pull-requests : ' write'
62- permission-contents : ' write'
6356
6457 - name : ' Configure Git User'
6558 run : |-
7265 id : ' create_patch'
7366 env :
7467 GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
75- GH_TOKEN : ' ${{ steps.generate_token.outputs.token }}'
68+ GH_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
7669 continue-on-error : true
7770 run : |
7871 # Capture output and display it in logs using tee
Original file line number Diff line number Diff line change @@ -98,6 +98,14 @@ async function main() {
9898 // Workaround for workflow permission issues: create branch from HEAD then reset to tag
9999 run ( `git checkout -b ${ releaseBranch } ` , dryRun ) ;
100100 run ( `git reset --hard ${ latestTag } ` , dryRun ) ;
101+
102+ // Ensure we're using GITHUB_TOKEN (with actions:write) for pushing workflow files
103+ const githubToken = process . env . GITHUB_TOKEN ;
104+ const repo = process . env . GITHUB_REPOSITORY || 'google-gemini/gemini-cli' ;
105+ if ( githubToken ) {
106+ run ( `git remote set-url origin https://x-access-token:${ githubToken } @github.com/${ repo } .git` , dryRun ) ;
107+ }
108+
101109 run ( `git push origin ${ releaseBranch } ` , dryRun ) ;
102110 } else {
103111 console . log ( `Release branch ${ releaseBranch } already exists.` ) ;
You can’t perform that action at this time.
0 commit comments