File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
1
name : Internal CI
2
2
3
3
on :
4
- pull_request :
4
+ pull_request_target :
5
5
branches :
6
6
- ' **' # Triggers on a PR to any Branch
7
7
8
+ permissions :
9
+ contents : read
10
+ pull-requests : read
11
+
8
12
jobs :
9
13
build :
10
14
15
+ if : github.event.pull_request.draft == false
11
16
runs-on : [self-hosted, Linux, X64] # Runs on a Lunar lake
12
17
env :
13
18
BUILD_SOURCESDIRECTORY : ${{ github.workspace }}
14
19
BUILD_BINARIESDIRECTORY : ${{ github.workspace }}/build
20
+
15
21
steps :
16
- - uses : actions/checkout@v4
22
+ - name : Check PR Author Authorization
23
+ run : |
24
+ if [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
25
+ echo "PR is from a fork: ${{ github.event.pull_request.head.repo.full_name }}"
26
+ fi
27
+
28
+ - name : Checkout PR Branch
29
+ uses : actions/checkout@v4
17
30
with :
18
- ref : ${{ github.event.pull_request.head.ref }} # checkout the pr branch
31
+ ref : ${{ github.event.pull_request.head.ref }}
32
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
33
+ fetch-depth : 1 # checkout the pr branch
19
34
20
35
- name : Set up Python
21
36
uses : actions/setup-python@v4
You can’t perform that action at this time.
0 commit comments