Skip to content

Commit b9c46c0

Browse files
author
Ernesto Castellotti
authored
Require approval for web preview from outside the organization (#227)
1 parent fe8494c commit b9c46c0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/preview-pr.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@ name: preview-pr
22

33
on:
44
pull_request_target:
5-
types: [opened, reopened]
5+
types: [opened, reopened, synchronize]
66

77
permissions:
88
pull-requests: write
99

1010
jobs:
11+
authorize:
12+
environment:
13+
${{ github.event_name == 'pull_request_target' &&
14+
github.event.pull_request.head.repo.full_name != github.repository &&
15+
'external' || 'internal' }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: "true"
19+
1120
build:
21+
needs: authorize
1222
runs-on: ubuntu-latest
1323
steps:
1424
- name: Checkout

0 commit comments

Comments
 (0)