Skip to content

Commit c67f89b

Browse files
Use GH App token instead of PAT token to trigger the deploy workflow (#100)
1 parent 6019595 commit c67f89b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/main.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: main
1+
name: Main
22

33
on:
44
push:
@@ -13,6 +13,7 @@ on:
1313

1414
jobs:
1515
format:
16+
name: Format
1617
runs-on: ubuntu-24.04
1718

1819
permissions:
@@ -34,6 +35,7 @@ jobs:
3435
run: npm run format:check
3536

3637
deploy:
38+
name: Deploy
3739
if: ${{ github.event_name == 'release' }}
3840
needs: format
3941
runs-on: ubuntu-24.04
@@ -65,9 +67,16 @@ jobs:
6567
dist
6668
package.json
6769
70+
- name: Generate GH App token
71+
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
72+
id: app-token
73+
with:
74+
app-id: ${{ secrets.BW_GHAPP_ID }}
75+
private-key: ${{ secrets.BW_GHAPP_KEY }}
76+
6877
- name: Dispatch deployment
6978
env:
70-
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_GITHUB_TOKEN }}
79+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
7180
run: >
7281
gh workflow run deploy-passwordless-client-js
7382
--repo bitwarden/passwordless-devops

0 commit comments

Comments
 (0)