File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ name: Parallel Tests
5
5
on :
6
6
# Allow to repo owner to manually run this workflow for external PRs once code is vetted
7
7
workflow_dispatch :
8
-
8
+ pull_request_review :
9
+ types : [submitted]
10
+
9
11
# Run automatically for internal PRs and pushes
10
12
pull_request :
11
13
branches :
20
22
jobs :
21
23
22
24
test_installer : # test install_ubuntu.sh
25
+ if : github.event.review.state == 'approved'
23
26
runs-on : panda-arc # Note 22.04 would work, but it requires docker > 20.10.7 which is not on our CI box (yet)
24
27
container :
25
28
image : ubuntu:20.04
44
47
- name : Run install_ubuntu.sh
45
48
run : cd $GITHUB_WORKSPACE && ./panda/scripts/install_ubuntu.sh
46
49
47
-
48
50
build_container :
49
- if : github.repository == 'panda-re/panda'
51
+ if : github.repository == 'panda-re/panda' && github.event.review.state == 'approved'
50
52
runs-on : panda-arc
51
53
steps :
52
54
- name : Install git
73
75
run : docker run --rm "ghcr.io/${{ github.repository_owner }}/panda_local:${{ github.sha }}" /bin/bash -c 'exit $(/panda/build/arm-softmmu/panda-system-arm -help | grep -q "usage. panda-system-arm")'
74
76
75
77
tests :
76
- if : github.repository == 'panda-re/panda'
78
+ if : github.repository == 'panda-re/panda' && github.event.review.state == 'approved '
77
79
runs-on : panda-arc
78
80
needs : [build_container]
79
81
@@ -140,9 +142,9 @@ jobs:
140
142
141
143
cleanup :
142
144
# Cleanup after prior jobs finish - even if they fail
145
+ if : always()
143
146
needs : [tests]
144
147
runs-on : panda-arc
145
- if : always()
146
148
147
149
steps :
148
150
# Note we leave the last 72hrs because caching is nice (first few panda image layers won't change often)
@@ -156,7 +158,7 @@ jobs:
156
158
157
159
build_and_check_fork : # Forked repos can't use panda-arc test suite - just checkout and run make check
158
160
if : github.repository != 'panda-re/panda'
159
- runs-on : panda-arc
161
+ runs-on : ubuntu-20.04
160
162
161
163
steps :
162
164
- uses : actions/checkout@v4 # Clones code into to /home/runner/work/panda
Original file line number Diff line number Diff line change
1
+ name : Review Approval
2
+
3
+ on :
4
+ pull_request_target :
5
+ types : [opened, synchronize, reopened, ready_for_review]
6
+ pull_request_review :
7
+ types : [submitted]
8
+
9
+ jobs :
10
+ approve-workflow :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Check if review is approved
14
+ if : github.event_name == 'pull_request_review' && github.event.review.state == 'approved'
15
+ run : echo "Review approved"
16
+
17
+ - name : Require new approval for new pushes
18
+ if : github.event_name == 'pull_request_target'
19
+ run : echo "New push detected, approval required"
You can’t perform that action at this time.
0 commit comments