Skip to content

Commit

Permalink
Use GH App token instead of PAT token to trigger the deploy workflow (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
michalchecinski authored Jan 13, 2025
1 parent 6019595 commit c67f89b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: main
name: Main

on:
push:
Expand All @@ -13,6 +13,7 @@ on:

jobs:
format:
name: Format
runs-on: ubuntu-24.04

permissions:
Expand All @@ -34,6 +35,7 @@ jobs:
run: npm run format:check

deploy:
name: Deploy
if: ${{ github.event_name == 'release' }}
needs: format
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -65,9 +67,16 @@ jobs:
dist
package.json
- name: Generate GH App token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
app-id: ${{ secrets.BW_GHAPP_ID }}
private-key: ${{ secrets.BW_GHAPP_KEY }}

- name: Dispatch deployment
env:
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: >
gh workflow run deploy-passwordless-client-js
--repo bitwarden/passwordless-devops
Expand Down

0 comments on commit c67f89b

Please sign in to comment.