|
23 | 23 | steps:
|
24 | 24 | - name: Checkout
|
25 | 25 | uses: actions/checkout@v5
|
| 26 | + with: |
| 27 | + fetch-depth: 1 |
| 28 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 29 | + |
| 30 | + - name: Use local branch |
| 31 | + shell: bash |
| 32 | + run: | |
| 33 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 34 | + git branch -D $BRANCH 2>/dev/null || true |
| 35 | + git branch $BRANCH HEAD |
| 36 | + git checkout $BRANCH |
26 | 37 |
|
27 | 38 | - name: Install PHP
|
28 | 39 | uses: shivammathur/setup-php@v2
|
|
47 | 58 | steps:
|
48 | 59 | - name: Checkout
|
49 | 60 | uses: actions/checkout@v5
|
| 61 | + with: |
| 62 | + fetch-depth: 1 |
| 63 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 64 | + |
| 65 | + - name: Use local branch |
| 66 | + shell: bash |
| 67 | + run: | |
| 68 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 69 | + git branch -D $BRANCH 2>/dev/null || true |
| 70 | + git branch $BRANCH HEAD |
| 71 | + git checkout $BRANCH |
50 | 72 |
|
51 | 73 | - name: Install PHP
|
52 | 74 | uses: shivammathur/setup-php@v2
|
|
71 | 93 | steps:
|
72 | 94 | - name: Checkout
|
73 | 95 | uses: actions/checkout@v5
|
| 96 | + with: |
| 97 | + fetch-depth: 1 |
| 98 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 99 | + |
| 100 | + - name: Use local branch |
| 101 | + shell: bash |
| 102 | + run: | |
| 103 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 104 | + git branch -D $BRANCH 2>/dev/null || true |
| 105 | + git branch $BRANCH HEAD |
| 106 | + git checkout $BRANCH |
74 | 107 |
|
75 | 108 | - name: Install PHP
|
76 | 109 | uses: shivammathur/setup-php@v2
|
@@ -118,6 +151,17 @@ jobs:
|
118 | 151 |
|
119 | 152 | - name: Checkout
|
120 | 153 | uses: actions/checkout@v5
|
| 154 | + with: |
| 155 | + fetch-depth: 1 |
| 156 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 157 | + |
| 158 | + - name: Use local branch |
| 159 | + shell: bash |
| 160 | + run: | |
| 161 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 162 | + git branch -D $BRANCH 2>/dev/null || true |
| 163 | + git branch $BRANCH HEAD |
| 164 | + git checkout $BRANCH |
121 | 165 |
|
122 | 166 | - name: Install PHP with extensions
|
123 | 167 | uses: shivammathur/setup-php@v2
|
@@ -166,6 +210,17 @@ jobs:
|
166 | 210 |
|
167 | 211 | - name: Checkout
|
168 | 212 | uses: actions/checkout@v5
|
| 213 | + with: |
| 214 | + fetch-depth: 1 |
| 215 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 216 | + |
| 217 | + - name: Use local branch |
| 218 | + shell: bash |
| 219 | + run: | |
| 220 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 221 | + git branch -D $BRANCH 2>/dev/null || true |
| 222 | + git branch $BRANCH HEAD |
| 223 | + git checkout $BRANCH |
169 | 224 |
|
170 | 225 | - name: Install PHP with extensions
|
171 | 226 | uses: shivammathur/setup-php@v2
|
@@ -193,6 +248,17 @@ jobs:
|
193 | 248 | steps:
|
194 | 249 | - name: Checkout
|
195 | 250 | uses: actions/checkout@v5
|
| 251 | + with: |
| 252 | + fetch-depth: 1 |
| 253 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 254 | + |
| 255 | + - name: Use local branch |
| 256 | + shell: bash |
| 257 | + run: | |
| 258 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 259 | + git branch -D $BRANCH 2>/dev/null || true |
| 260 | + git branch $BRANCH HEAD |
| 261 | + git checkout $BRANCH |
196 | 262 |
|
197 | 263 | - name: Install PHP with extensions
|
198 | 264 | uses: shivammathur/setup-php@v2
|
@@ -240,6 +306,17 @@ jobs:
|
240 | 306 | steps:
|
241 | 307 | - name: Checkout
|
242 | 308 | uses: actions/checkout@v5
|
| 309 | + with: |
| 310 | + fetch-depth: 1 |
| 311 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 312 | + |
| 313 | + - name: Use local branch |
| 314 | + shell: bash |
| 315 | + run: | |
| 316 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 317 | + git branch -D $BRANCH 2>/dev/null || true |
| 318 | + git branch $BRANCH HEAD |
| 319 | + git checkout $BRANCH |
243 | 320 |
|
244 | 321 | - name: Install PHP with extensions
|
245 | 322 | uses: shivammathur/setup-php@v2
|
@@ -299,6 +376,17 @@ jobs:
|
299 | 376 | steps:
|
300 | 377 | - name: Checkout
|
301 | 378 | uses: actions/checkout@v5
|
| 379 | + with: |
| 380 | + fetch-depth: 1 |
| 381 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 382 | + |
| 383 | + - name: Use local branch |
| 384 | + shell: bash |
| 385 | + run: | |
| 386 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 387 | + git branch -D $BRANCH 2>/dev/null || true |
| 388 | + git branch $BRANCH HEAD |
| 389 | + git checkout $BRANCH |
302 | 390 |
|
303 | 391 | - name: Install PHP with extensions
|
304 | 392 | uses: shivammathur/setup-php@v2
|
|
0 commit comments