File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,17 @@ jobs:
169169
170170 - name : Checkout
171171 uses : actions/checkout@v4
172+ with :
173+ fetch-depth : 0
174+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
175+
176+ - name : Use local branch
177+ shell : bash
178+ run : |
179+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
180+ git branch -D $BRANCH 2>/dev/null || true
181+ git branch $BRANCH HEAD
182+ git checkout $BRANCH
172183
173184 - name : Install PHP with extensions
174185 uses : shivammathur/setup-php@v2
@@ -198,6 +209,17 @@ jobs:
198209 steps :
199210 - name : Checkout
200211 uses : actions/checkout@v4
212+ with :
213+ fetch-depth : 0
214+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
215+
216+ - name : Use local branch
217+ shell : bash
218+ run : |
219+ BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
220+ git branch -D $BRANCH 2>/dev/null || true
221+ git branch $BRANCH HEAD
222+ git checkout $BRANCH
201223
202224 - name : Install PHP with extensions
203225 uses : shivammathur/setup-php@v2
You can’t perform that action at this time.
0 commit comments