28
28
packages : read
29
29
pull-requests : write
30
30
steps :
31
+ - name : Log in to Azure
32
+ uses : bitwarden/gh-actions/azure-login@main
33
+ with :
34
+ subscription_id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
35
+ tenant_id : ${{ secrets.AZURE_TENANT_ID }}
36
+ client_id : ${{ secrets.AZURE_CLIENT_ID }}
37
+
38
+ - name : Get Azure Key Vault secrets
39
+ id : get-kv-secrets
40
+ uses : bitwarden/gh-actions/get-keyvault-secrets@main
41
+ with :
42
+ keyvault : gh-org-bitwarden
43
+ secrets : " BW-GHAPP-ID,BW-GHAPP-KEY"
44
+
45
+ - name : Log out from Azure
46
+ uses : bitwarden/gh-actions/azure-logout@main
47
+
48
+ - name : Generate GH App token
49
+ uses : actions/create-github-app-token@30bf6253fa41bdc8d1501d202ad15287582246b4 # v2.0.3
50
+ id : app-token
51
+ with :
52
+ app-id : ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
53
+ private-key : ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
54
+ owner : bitwarden
55
+ repositories : clients
56
+ permission-actions : write
57
+
31
58
- name : Checkout
32
59
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60
+
33
61
- name : Setup Node
34
62
uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
35
63
with :
@@ -155,7 +183,7 @@ jobs:
155
183
uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
156
184
if : failure() && github.event.client_payload.origin_issue
157
185
with :
158
- github-token : ${{ secrets.GITHUB_TOKEN }}
186
+ github-token : ${{ steps.app-token.outputs.token }}
159
187
script : |
160
188
const owner = 'bitwarden';
161
189
const runURL = `https://github.com/${owner}/browser-interactions-testing/actions/runs/${context.runId}`;
@@ -181,14 +209,14 @@ jobs:
181
209
uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
182
210
if : success() && github.event.client_payload.origin_issue
183
211
with :
184
- github-token : ${{ secrets.GITHUB_TOKEN }}
212
+ github-token : ${{ steps.app-token.outputs.token }}
185
213
script : |
186
214
const owner = 'bitwarden';
187
215
const message = `⚠️ **Files have been modified in this PR that impact the Autofill experience** ⚠️
188
216
189
217
[BIT](https://github.com/${owner}/browser-interactions-testing) was run to verify no regressions have been introduced to the core Autofill experience.
190
218
191
- ✅ Fortunately, [these BIT tests have passed](https://github.com/${owner}/browser-interactions-testing/actions/runs/${context.runId})! 🎉
219
+ ✅ Fortunately, [these BIT tests have passed](https://github.com/${owner}/browser-interactions-testing/actions/runs/${context.runId})! 🎉`;
192
220
193
221
github.rest.issues.createComment({
194
222
issue_number: context.payload.client_payload.origin_issue,
0 commit comments