Skip to content

Commit cef28de

Browse files
committed
update the multi-approver workflow
1 parent 740d2b4 commit cef28de

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/multi-approvers.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,39 @@ concurrency:
3232
jobs:
3333
multi-approvers:
3434
if: github.event_name == 'pull_request_review' && (github.event.review.state == 'approved' || github.event.action == 'dismissed')
35-
uses: 'abcxyz/pkg/.github/workflows/multi-approvers.yml@main'
36-
with:
37-
org-members-path: 'GoogleCloudPlatform/cluster-toolkit/develop/cluster-toolkit-writers.json'
35+
runs-on: 'ubuntu-latest'
36+
steps:
37+
- name: 'Authenticate to Google Cloud'
38+
id: 'minty-auth'
39+
uses: 'google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f' # ratchet:google-github-actions/auth@v2
40+
with:
41+
create_credentials_file: false
42+
export_environment_variables: false
43+
workload_identity_provider: '${{ vars.TOKEN_MINTER_WIF_PROVIDER }}'
44+
service_account: '${{ vars.TOKEN_MINTER_WIF_SERVICE_ACCOUNT }}'
45+
token_format: 'id_token'
46+
id_token_audience: '${{ vars.TOKEN_MINTER_SERVICE_AUDIENCE }}'
47+
id_token_include_email: true
48+
49+
- name: 'Mint Token'
50+
id: 'minty'
51+
uses: 'abcxyz/github-token-minter/.github/actions/minty@main' # ratchet:exclude
52+
with:
53+
id_token: '${{ steps.minty-auth.outputs.id_token }}'
54+
service_url: '${{ vars.TOKEN_MINTER_SERVICE_URL }}'
55+
requested_permissions: |-
56+
{
57+
"scope": "multi-approvers-action",
58+
"repositories": ["cluster-toolkit"],
59+
"permissions": {
60+
"actions": "write",
61+
"members": "read",
62+
"pull_requests": "read"
63+
}
64+
}
65+
66+
- name: 'Multi-approvers'
67+
uses: 'abcxyz/actions/.github/actions/multi-approvers'
68+
with:
69+
team: 'hpc-toolkit'
70+
token: '${{ steps.minty.outputs.token }}'

0 commit comments

Comments
 (0)