Skip to content

Commit b62d4b7

Browse files
authored
ci: 👷 use GitHub App token for syncing files (#69)
## Description Use the GitHub App to make a token for syncing. <!-- Select quick/in-depth as necessary --> No review needed.
1 parent 95b31a4 commit b62d4b7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/sync-files.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,25 @@ jobs:
99
sync:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- uses: actions/create-github-app-token@v2
13+
id: app-token
14+
with:
15+
app-id: ${{ vars.SYNC_FILES_APP_ID }}
16+
private-key: ${{ secrets.SYNC_FILES_TOKEN }}
17+
1218
- name: Checkout Repository
13-
uses: actions/checkout@main
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ steps.app-token.outputs.token }}
1422

1523
- name: Run GitHub File Sync
1624
uses: BetaHuhn/repo-file-sync-action@v1
1725
with:
18-
GH_PAT: ${{ secrets.SYNC_PAT }}
26+
GH_PAT: ${{ steps.app-token.outputs.token }}
1927
ASSIGNEES: lwjohnst86
2028
IS_FINE_GRAINED: true
21-
GIT_USERNAME: lwjohnst86
22-
GIT_EMAIL: lwjohnst@gmail.com
29+
GIT_USERNAME: github-actions[bot]
30+
GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
2331
COMMIT_PREFIX: "chore(sync): :hammer: "
2432
BRANCH_PREFIX: chore
2533
TEAM_REVIEWERS: admin

0 commit comments

Comments
 (0)