2222 steps :
2323 - name : Checkout
2424 uses : actions/checkout@v5
25+ with :
26+ fetch-depth : 1
27+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
28+
29+ - name : Use local branch
30+ shell : bash
31+ run : |
32+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
33+ git branch -D $BRANCH 2>/dev/null || true
34+ git branch $BRANCH HEAD
35+ git checkout $BRANCH
2536
2637 - name : Install PHP
2738 uses : shivammathur/setup-php@v2
4556 steps :
4657 - name : Checkout
4758 uses : actions/checkout@v5
59+ with :
60+ fetch-depth : 1
61+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
62+
63+ - name : Use local branch
64+ shell : bash
65+ run : |
66+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
67+ git branch -D $BRANCH 2>/dev/null || true
68+ git branch $BRANCH HEAD
69+ git checkout $BRANCH
4870
4971 - name : Install PHP
5072 uses : shivammathur/setup-php@v2
6890 steps :
6991 - name : Checkout
7092 uses : actions/checkout@v5
93+ with :
94+ fetch-depth : 1
95+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
96+
97+ - name : Use local branch
98+ shell : bash
99+ run : |
100+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
101+ git branch -D $BRANCH 2>/dev/null || true
102+ git branch $BRANCH HEAD
103+ git checkout $BRANCH
71104
72105 - name : Install PHP
73106 uses : shivammathur/setup-php@v2
@@ -122,6 +155,17 @@ jobs:
122155
123156 - name : Checkout
124157 uses : actions/checkout@v5
158+ with :
159+ fetch-depth : 1
160+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
161+
162+ - name : Use local branch
163+ shell : bash
164+ run : |
165+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
166+ git branch -D $BRANCH 2>/dev/null || true
167+ git branch $BRANCH HEAD
168+ git checkout $BRANCH
125169
126170 - name : Install PHP with extensions
127171 uses : shivammathur/setup-php@v2
@@ -173,6 +217,17 @@ jobs:
173217
174218 - name : Checkout
175219 uses : actions/checkout@v5
220+ with :
221+ fetch-depth : 1
222+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
223+
224+ - name : Use local branch
225+ shell : bash
226+ run : |
227+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
228+ git branch -D $BRANCH 2>/dev/null || true
229+ git branch $BRANCH HEAD
230+ git checkout $BRANCH
176231
177232 - name : Install PHP with extensions
178233 uses : shivammathur/setup-php@v2
@@ -199,6 +254,17 @@ jobs:
199254 steps :
200255 - name : Checkout
201256 uses : actions/checkout@v5
257+ with :
258+ fetch-depth : 1
259+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
260+
261+ - name : Use local branch
262+ shell : bash
263+ run : |
264+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
265+ git branch -D $BRANCH 2>/dev/null || true
266+ git branch $BRANCH HEAD
267+ git checkout $BRANCH
202268
203269 - name : Install PHP with extensions
204270 uses : shivammathur/setup-php@v2
@@ -245,6 +311,17 @@ jobs:
245311 steps :
246312 - name : Checkout
247313 uses : actions/checkout@v5
314+ with :
315+ fetch-depth : 1
316+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
317+
318+ - name : Use local branch
319+ shell : bash
320+ run : |
321+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
322+ git branch -D $BRANCH 2>/dev/null || true
323+ git branch $BRANCH HEAD
324+ git checkout $BRANCH
248325
249326 - name : Install PHP with extensions
250327 uses : shivammathur/setup-php@v2
@@ -307,6 +384,17 @@ jobs:
307384 steps :
308385 - name : Checkout
309386 uses : actions/checkout@v5
387+ with :
388+ fetch-depth : 1
389+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
390+
391+ - name : Use local branch
392+ shell : bash
393+ run : |
394+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
395+ git branch -D $BRANCH 2>/dev/null || true
396+ git branch $BRANCH HEAD
397+ git checkout $BRANCH
310398
311399 - name : Install PHP with extensions
312400 uses : shivammathur/setup-php@v2
0 commit comments