Skip to content

Commit bbd614f

Browse files
committed
ci: use github app token for creating automated pr
1 parent 9a48ec8 commit bbd614f

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/check-project.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Check project
22
on:
3-
workflow_dispatch:
43
push:
54
branches:
65
- main

.github/workflows/upgrade-template-deps.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
actions: write
109
contents: write
1110
pull-requests: write
1211

@@ -15,8 +14,17 @@ jobs:
1514
runs-on: ubuntu-latest
1615

1716
steps:
17+
- name: Generate GitHub App token
18+
id: app-token
19+
uses: actions/create-github-app-token@v1
20+
with:
21+
app-id: ${{ secrets.APP_ID }}
22+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
23+
1824
- name: Checkout
1925
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
with:
27+
token: ${{ steps.app-token.outputs.token }}
2028

2129
- name: Setup
2230
uses: ./.github/actions/setup
@@ -51,11 +59,5 @@ jobs:
5159
--body "Automated upgrade of template dependencies via \`scripts/upgrade-template-deps.mts\`." \
5260
--label "dependencies"
5361
fi
54-
55-
# Workflows triggered by github.token don't run on the pushed branch,
56-
# so dispatch the required validation workflows explicitly.
57-
for workflow in check-project.yml build-templates.yml; do
58-
gh workflow run "$workflow" --ref "$branch"
59-
done
6062
env:
61-
GH_TOKEN: ${{ github.token }}
63+
GH_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)