Skip to content

Commit

Permalink
ci: use actions/create-github-app-token for workflow access tokens (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Oct 23, 2024
1 parent 20cb933 commit 2cd2a5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/weak-waves-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@bfra.me/.github": patch
---

Switch to `actions/create-github-app-token` to generate workflow access tokens.

8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
steps:
- id: get-workflow-access-token
name: Get Workflow Access Token
uses: peter-murray/workflow-application-token-action@baa1ef2638c3d9e5967b7c8b86219f8fc919e1bb # v3.0.1
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
permissions: 'contents:write, issues:write, pull_requests:write'
app-id: ${{ secrets.APPLICATION_ID }}
private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Setup Git user
run: |
git config --global user.email '118100583+bfra-me[bot]@users.noreply.github.com'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ jobs:
- id: get-workflow-access-token
if: github.event_name != 'push' || steps.filter.outputs.changes == 'true'
uses: peter-murray/workflow-application-token-action@baa1ef2638c3d9e5967b7c8b86219f8fc919e1bb # v3.0.1
name: Get Workflow Access Token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
permissions: 'administration:write, contents:read, issues:write'
app-id: ${{ secrets.APPLICATION_ID }}
private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- env:
GITHUB_TOKEN: ${{ steps.get-workflow-access-token.outputs.token }}
Expand Down

0 comments on commit 2cd2a5d

Please sign in to comment.