File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,22 @@ jobs:
15
15
with :
16
16
submodules : false
17
17
18
- - name : Fetch Base Branch
18
+ - name : Set Base and Head Refs
19
+ run : |
20
+ BASE_REF="${{ github.event.pull_request.base.sha }}"
21
+ HEAD_REF="${{ github.event.pull_request.head.sha }}"
22
+ BASE_REMOTE="${{github.event.pull_request.base.repo.clone_url}}"
23
+ HEAD_REMOTE="${{github.event.pull_request.head.repo.clone_url}}"
24
+
25
+ echo "BASE_REF=$BASE_REF" >> $GITHUB_ENV
26
+ echo "HEAD_REF=$HEAD_REF" >> $GITHUB_ENV
27
+ echo "BASE_REMOTE=$BASE_REMOTE" >> $GITHUB_ENV
28
+ echo "HEAD_REMOTE=$HEAD_REMOTE" >> $GITHUB_ENV
29
+
30
+ - name : Fetch Branches
19
31
run : |
20
- # Fetch all history for the base branch and PR head
21
- git fetch origin ${{ github.base_ref }} --depth=1
22
- git fetch origin ${{ github.head_ref }} --depth=1
32
+ git fetch ${BASE_REMOTE} ${BASE_REF}
33
+ git fetch ${HEAD_REMOTE} ${HEAD_REF}
23
34
24
35
- name : Detect Added Submodules
25
36
run : |
45
56
args : --check addons
46
57
47
58
metadata :
59
+ name : Fetch metadata
48
60
runs-on : ubuntu-latest
49
61
permissions :
50
62
contents : write
66
78
echo "BASE_REMOTE=$BASE_REMOTE" >> $GITHUB_ENV
67
79
echo "HEAD_REMOTE=$HEAD_REMOTE" >> $GITHUB_ENV
68
80
69
- - name : Fetch Base Branch
81
+ - name : Fetch Branches
70
82
run : |
71
- # Fetch all history for the base branch and PR head
72
83
git fetch ${BASE_REMOTE} ${BASE_REF}
73
84
git fetch ${HEAD_REMOTE} ${HEAD_REF}
74
85
You can’t perform that action at this time.
0 commit comments