Skip to content

Commit 9d2a85a

Browse files
committed
GCP User IAM workflow update pull request trigger to pull_request_target and adjust permissions
1 parent 5675d57 commit 9d2a85a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/beam_Infrastructure_UsersPermissions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
- main
3131
paths:
3232
- 'infra/iam/users.yml'
33-
pull_request:
33+
pull_request_target:
3434
paths:
3535
- 'infra/iam/users.yml'
3636

@@ -41,7 +41,7 @@ concurrency:
4141

4242
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
4343
permissions:
44-
contents: read
44+
contents: write
4545
pull-requests: write
4646

4747
jobs:
@@ -85,6 +85,6 @@ jobs:
8585
run: gh pr comment ${{ github.event.pull_request.number }} --body-file comment_body.txt
8686

8787
- name: Terraform Apply
88-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
88+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'apache/beam'
8989
working-directory: ./infra/iam
9090
run: terraform apply -auto-approve tfplan

0 commit comments

Comments
 (0)