Skip to content

Commit

Permalink
new permission approach
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Florentine <[email protected]>
  • Loading branch information
jflo committed Feb 1, 2024
1 parent 61bbe36 commit 339ca76
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: acceptance-tests
on:
pull_request:
pull_request_target:
branches:
- main
pull_request_review:
types: [submitted]

Expand All @@ -9,8 +11,17 @@ env:
total-runners: 16

jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
shouldRun:
name: checks to ensure we should run
needs: authorize
# necessary because there is no single PR approved event, need to check all comments/approvals/denials
runs-on: ubuntu-22.04
outputs:
Expand Down Expand Up @@ -60,6 +71,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Set up Java
uses: actions/[email protected]
with:
Expand Down

0 comments on commit 339ca76

Please sign in to comment.