Skip to content

Commit 0823b08

Browse files
authored
Update extract-classnames.yml
1 parent dcd37ed commit 0823b08

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/extract-classnames.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,22 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
with:
21-
persist-credentials: false # disable GITHUB_TOKEN so we can use BOT_TOKEN
22-
23-
- name: Set up Git user for bot
24-
run: |
25-
git config --global user.name "scratchtools-bot"
26-
git config --global user.email "[email protected]"
21+
persist-credentials: false
22+
fetch-depth: 0
2723

2824
- name: Set up Node.js
2925
uses: actions/setup-node@v4
3026
with:
3127
node-version: 20
3228

29+
- name: Generate GitHub App token
30+
id: generate_token
31+
uses: tibdex/github-app-token@v2
32+
with:
33+
app_id: ${{ secrets.APP_ID }}
34+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
35+
installation_id: ${{ secrets.INSTALLATION_ID }}
36+
3337
- name: Run extraction script
3438
run: node .github/scripts/extract-classnames.js
3539

@@ -46,7 +50,7 @@ jobs:
4650
if: steps.git-diff.outputs.changed == 'true'
4751
uses: peter-evans/create-pull-request@v6
4852
with:
49-
token: ${{ secrets.BOT_TOKEN }}
53+
token: ${{ steps.generate_token.outputs.token }}
5054
commit-message: "Update class-names.json"
5155
branch: update-class-names
5256
title: "Update feature class names"

0 commit comments

Comments
 (0)