|
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
|
@@ -117,6 +150,17 @@ jobs:
|
117 | 150 |
|
118 | 151 | - name: Checkout
|
119 | 152 | uses: actions/checkout@v5
|
| 153 | + with: |
| 154 | + fetch-depth: 1 |
| 155 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 156 | + |
| 157 | + - name: Use local branch |
| 158 | + shell: bash |
| 159 | + run: | |
| 160 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 161 | + git branch -D $BRANCH 2>/dev/null || true |
| 162 | + git branch $BRANCH HEAD |
| 163 | + git checkout $BRANCH |
120 | 164 |
|
121 | 165 | - name: Install PHP with extensions
|
122 | 166 | uses: shivammathur/setup-php@v2
|
@@ -165,7 +209,7 @@ jobs:
|
165 | 209 | - name: Checkout
|
166 | 210 | uses: actions/checkout@v5
|
167 | 211 | with:
|
168 |
| - fetch-depth: 0 |
| 212 | + fetch-depth: 1 |
169 | 213 | ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
170 | 214 |
|
171 | 215 | - name: Use local branch
|
@@ -203,7 +247,7 @@ jobs:
|
203 | 247 | - name: Checkout
|
204 | 248 | uses: actions/checkout@v5
|
205 | 249 | with:
|
206 |
| - fetch-depth: 0 |
| 250 | + fetch-depth: 1 |
207 | 251 | ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
208 | 252 |
|
209 | 253 | - name: Use local branch
|
@@ -260,6 +304,17 @@ jobs:
|
260 | 304 | steps:
|
261 | 305 | - name: Checkout
|
262 | 306 | uses: actions/checkout@v5
|
| 307 | + with: |
| 308 | + fetch-depth: 1 |
| 309 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 310 | + |
| 311 | + - name: Use local branch |
| 312 | + shell: bash |
| 313 | + run: | |
| 314 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 315 | + git branch -D $BRANCH 2>/dev/null || true |
| 316 | + git branch $BRANCH HEAD |
| 317 | + git checkout $BRANCH |
263 | 318 |
|
264 | 319 | - name: Install PHP with extensions
|
265 | 320 | uses: shivammathur/setup-php@v2
|
@@ -318,6 +373,17 @@ jobs:
|
318 | 373 | steps:
|
319 | 374 | - name: Checkout
|
320 | 375 | uses: actions/checkout@v5
|
| 376 | + with: |
| 377 | + fetch-depth: 1 |
| 378 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 379 | + |
| 380 | + - name: Use local branch |
| 381 | + shell: bash |
| 382 | + run: | |
| 383 | + BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}") |
| 384 | + git branch -D $BRANCH 2>/dev/null || true |
| 385 | + git branch $BRANCH HEAD |
| 386 | + git checkout $BRANCH |
321 | 387 |
|
322 | 388 | - name: Install PHP with extensions
|
323 | 389 | uses: shivammathur/setup-php@v2
|
|
0 commit comments