@@ -185,13 +185,6 @@ jobs:
185185 - name : Log in to ACR - production subscription
186186 run : az acr login -n bitwardenprod
187187
188- - name : Retrieve GitHub PAT secrets
189- id : retrieve-secret-pat
190- uses : bitwarden/gh-actions/get-keyvault-secrets@main
191- with :
192- keyvault : " bitwarden-ci"
193- secrets : " github-pat-bitwarden-devops-bot-repo-scope"
194-
195188 # ######### Generate image tag and build Docker image ##########
196189 - name : Generate Docker image tag
197190 id : tag
@@ -250,8 +243,6 @@ jobs:
250243 linux/arm64
251244 push : true
252245 tags : ${{ steps.image-tags.outputs.tags }}
253- secrets : |
254- "GH_PAT=${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}"
255246
256247 - name : Install Cosign
257248 if : github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
@@ -280,7 +271,7 @@ jobs:
280271 output-format : sarif
281272
282273 - name : Upload Grype results to GitHub
283- uses : github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
274+ uses : github/codeql-action/upload-sarif@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
284275 with :
285276 sarif_file : ${{ steps.container-scan.outputs.sarif }}
286277 sha : ${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.sha || github.sha }}
@@ -479,20 +470,29 @@ jobs:
479470 tenant_id : ${{ secrets.AZURE_TENANT_ID }}
480471 client_id : ${{ secrets.AZURE_CLIENT_ID }}
481472
482- - name : Retrieve GitHub PAT secrets
483- id : retrieve-secret-pat
473+ - name : Get Azure Key Vault secrets
474+ id : get-kv-secrets
484475 uses : bitwarden/gh-actions/get-keyvault-secrets@main
485476 with :
486- keyvault : " bitwarden-ci "
487- secrets : " github-pat-bitwarden-devops-bot-repo-scope "
477+ keyvault : gh-org-bitwarden
478+ secrets : " BW-GHAPP-ID,BW-GHAPP-KEY "
488479
489480 - name : Log out from Azure
490481 uses : bitwarden/gh-actions/azure-logout@main
491482
492- - name : Trigger Bitwarden Lite build
483+ - name : Generate GH App token
484+ uses : actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
485+ id : app-token
486+ with :
487+ app-id : ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
488+ private-key : ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
489+ owner : ${{ github.repository_owner }}
490+ repositories : self-host
491+
492+ - name : Trigger Bitwarden lite build
493493 uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
494494 with :
495- github-token : ${{ steps.retrieve-secret-pat .outputs.github-pat-bitwarden-devops-bot-repo-scope }}
495+ github-token : ${{ steps.app-token .outputs.token }}
496496 script : |
497497 await github.rest.actions.createWorkflowDispatch({
498498 owner: 'bitwarden',
@@ -520,20 +520,29 @@ jobs:
520520 tenant_id : ${{ secrets.AZURE_TENANT_ID }}
521521 client_id : ${{ secrets.AZURE_CLIENT_ID }}
522522
523- - name : Retrieve GitHub PAT secrets
524- id : retrieve-secret-pat
523+ - name : Get Azure Key Vault secrets
524+ id : get-kv-secrets
525525 uses : bitwarden/gh-actions/get-keyvault-secrets@main
526526 with :
527- keyvault : " bitwarden-ci "
528- secrets : " github-pat-bitwarden-devops-bot-repo-scope "
527+ keyvault : gh-org-bitwarden
528+ secrets : " BW-GHAPP-ID,BW-GHAPP-KEY "
529529
530530 - name : Log out from Azure
531531 uses : bitwarden/gh-actions/azure-logout@main
532532
533+ - name : Generate GH App token
534+ uses : actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
535+ id : app-token
536+ with :
537+ app-id : ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
538+ private-key : ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
539+ owner : ${{ github.repository_owner }}
540+ repositories : devops
541+
533542 - name : Trigger k8s deploy
534543 uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
535544 with :
536- github-token : ${{ steps.retrieve-secret-pat .outputs.github-pat-bitwarden-devops-bot-repo-scope }}
545+ github-token : ${{ steps.app-token .outputs.token }}
537546 script : |
538547 await github.rest.actions.createWorkflowDispatch({
539548 owner: 'bitwarden',
0 commit comments