Skip to content

Commit b66301b

Browse files
jatinwadhwa921ankitm3k
authored andcommitted
Updated Internal CI (#581)
1 parent 4986b48 commit b66301b

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/internal_ci.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
11
name : Internal CI
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
branches:
66
- '**' # Triggers on a PR to any Branch
77

8+
permissions:
9+
contents: read
10+
pull-requests: read
11+
812
jobs:
913
build:
1014

15+
if: github.event.pull_request.draft == false
1116
runs-on: [self-hosted, Linux, X64] # Runs on a Lunar lake
1217
env:
1318
BUILD_SOURCESDIRECTORY: ${{ github.workspace }}
1419
BUILD_BINARIESDIRECTORY: ${{ github.workspace }}/build
20+
1521
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
1730
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
1934

2035
- name: Set up Python
2136
uses: actions/setup-python@v4

0 commit comments

Comments
 (0)