Skip to content

Commit c93a0e9

Browse files
authored
ci: use App token in In-case-of-failure rollback job (#20162)
## Summary - The `In-case-of-failure` rollback job deletes the release git tag when the pipeline fails mid-way (after the tag was pushed but before the release completed) - It previously used the implicit `GITHUB_TOKEN`, which lacks the `workflows` scope — tag deletion would fail with "workflows scope may be required" if the tag pointed to a workflow-touching commit - Apply the same App token pattern as `build-release`: generate a token via `RELEASE_BOT` before checkout so `git push -d` uses the App's credentials (which carry `Workflows: Write`) ## Test plan - [ ] Verify `In-case-of-failure` job picks up the App token on next release run - [ ] No change to happy-path behavior (job only runs on failure) 🤖 Generated with Claude
1 parent 6847589 commit c93a0e9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,13 +699,22 @@ jobs:
699699
env:
700700
RELEASE_VERSION: ${{ inputs.release_version }}
701701
steps:
702+
- name: Generate GitHub App token for git operations
703+
id: generate_token_rollback
704+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf ## v2.2.1
705+
with:
706+
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
707+
private-key: ${{ secrets.RELEASE_BOT_APP_KEY }}
708+
repositories: "erigon"
709+
702710
- name: Checkout git repository ${{ env.APP_REPO }} reference ${{ inputs.checkout_ref }}
703711
uses: actions/checkout@v6
704712
with:
705713
repository: ${{ env.APP_REPO }}
706714
fetch-depth: 0
707715
ref: ${{ inputs.checkout_ref }}
708716
path: 'erigon'
717+
token: ${{ steps.generate_token_rollback.outputs.token }}
709718

710719
- name: Rollback - remove git tag ${{ inputs.release_version }}
711720
if: ${{ (inputs.perform_release) && (inputs.release_version != '') }}

0 commit comments

Comments
 (0)