Skip to content

Commit

Permalink
Update main workflow to use GitHub App token for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
michalchecinski committed Jan 24, 2025
1 parent 4ab464f commit 3b0222c
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,18 @@ jobs:
permissions: {} # no permissions required

steps:
- name: Log in to Azure - CI subscription
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
- name: Generate GH App token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}

- name: Retrieve GitHub PAT secrets
id: retrieve-secret-pat
uses: bitwarden/gh-actions/get-keyvault-secrets@main
with:
keyvault: "bitwarden-ci"
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
app-id: ${{ secrets.BW_GHAPP_ID }}
private-key: ${{ secrets.BW_GHAPP_KEY }}
owner: bitwarden
repositories: passwordless-devops

- name: Dispatch deployment
env:
GITHUB_TOKEN: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: >
gh workflow run deploy-passwordless-server.yml
--repo bitwarden/passwordless-devops
Expand Down

0 comments on commit 3b0222c

Please sign in to comment.