Skip to content

Commit

Permalink
Merge pull request #76 from boinkor-net/correct-token-usage
Browse files Browse the repository at this point in the history
Correct the usage of tokens in SRI update workflow
  • Loading branch information
antifuchs authored Dec 16, 2024
2 parents a0bed63 + d2b3cf8 commit 72e6a43
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/regenerate-go-sri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ jobs:
contents: write
steps:
- name: Generate token
id: generate-token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ vars.PR_FIXUP_APP_ID }}
private_key: ${{ secrets.PR_FIXUP_APP_PRIVATE_KEY }}
installation_id: ${{ vars.PR_FIXUP_INSTALLATION_ID }}
permissions: >-
{"contents": "write", "pull_requests": "write"}
- uses: actions/checkout@v4
with:
token: ${{secrets.REPO_CONTENT_UPDATE_TOKEN}}
token: ${{steps.generate_token.outputs.token}}
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: cachix/install-nix-action@v30
- uses: DeterminateSystems/magic-nix-cache-action@v8
Expand All @@ -53,7 +56,7 @@ jobs:
uses: peter-evans/create-pull-request@v7
if: github.event_name != 'workflow_dispatch' || !github.event.inputs.push_change
with:
token: ${{ steps.generate-token.outputs.token }}
token: ${{ steps.generate_token.outputs.token }}
author: Flakes Updater <[email protected]>
committer: Flakes Updater <[email protected]>
branch: auto-update-sri
Expand Down

0 comments on commit 72e6a43

Please sign in to comment.