|
71 | 71 | ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000' |
72 | 72 |
|
73 | 73 | steps: |
74 | | - - name: Checkout code |
| 74 | + # A same-repository pull request checks out through a git mirror on a sticky disk, so a slow |
| 75 | + # clone from GitHub (1 in 10 took a minute or more, up to 4) no longer sets the run's pace. |
| 76 | + # The mirror is one disk per repository that job steps can write to, so fork pull requests |
| 77 | + # and pushes, whose checks gate a deploy, keep the plain checkout: same trust split as the |
| 78 | + # setup action's caches. |
| 79 | + - &checkout-mirror |
| 80 | + name: Checkout code (mirror) |
| 81 | + if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork |
| 82 | + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 |
| 83 | + - &checkout-plain |
| 84 | + name: Checkout code |
| 85 | + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork |
75 | 86 | uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
76 | 87 |
|
77 | 88 | - name: Setup workspace |
@@ -175,8 +186,8 @@ jobs: |
175 | 186 | ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000' |
176 | 187 |
|
177 | 188 | steps: |
178 | | - - name: Checkout code |
179 | | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
| 189 | + - *checkout-mirror |
| 190 | + - *checkout-plain |
180 | 191 |
|
181 | 192 | - name: Setup workspace |
182 | 193 | uses: ./.github/actions/setup |
@@ -213,8 +224,14 @@ jobs: |
213 | 224 | outputs: |
214 | 225 | changed: ${{ github.event_name != 'pull_request' || steps.diff.outputs.changed != 'false' }} |
215 | 226 | steps: |
216 | | - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
217 | | - if: github.event_name == 'pull_request' |
| 227 | + - name: Checkout code (mirror) |
| 228 | + if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork |
| 229 | + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 |
| 230 | + with: |
| 231 | + fetch-depth: 2 |
| 232 | + - name: Checkout code |
| 233 | + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork |
| 234 | + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
218 | 235 | with: |
219 | 236 | fetch-depth: 2 |
220 | 237 | - name: Diff against the pull request's base |
@@ -261,8 +278,8 @@ jobs: |
261 | 278 | ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000' |
262 | 279 |
|
263 | 280 | steps: |
264 | | - - name: Checkout code |
265 | | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
| 281 | + - *checkout-mirror |
| 282 | + - *checkout-plain |
266 | 283 |
|
267 | 284 | - name: Setup workspace |
268 | 285 | uses: ./.github/actions/setup |
@@ -423,7 +440,16 @@ jobs: |
423 | 440 | # Worth stating because the failure was invisible for so long: the migration |
424 | 441 | # audit read the resulting `git diff` failure as "no migrations changed" and |
425 | 442 | # exited 0, so it had never actually run on a push build. |
426 | | - - name: Checkout code |
| 443 | + # Same mirror/plain split as the integration job's checkout. |
| 444 | + - &checkout-mirror-depth2 |
| 445 | + name: Checkout code (mirror) |
| 446 | + if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork |
| 447 | + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 |
| 448 | + with: |
| 449 | + fetch-depth: 2 |
| 450 | + - &checkout-plain-depth2 |
| 451 | + name: Checkout code |
| 452 | + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork |
427 | 453 | uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
428 | 454 | with: |
429 | 455 | fetch-depth: 2 |
@@ -573,10 +599,8 @@ jobs: |
573 | 599 | shard: [1, 2] |
574 | 600 |
|
575 | 601 | steps: |
576 | | - - name: Checkout code |
577 | | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
578 | | - with: |
579 | | - fetch-depth: 2 |
| 602 | + - *checkout-mirror-depth2 |
| 603 | + - *checkout-plain-depth2 |
580 | 604 |
|
581 | 605 | - name: Setup workspace |
582 | 606 | uses: ./.github/actions/setup |
@@ -627,8 +651,8 @@ jobs: |
627 | 651 | timeout-minutes: 25 |
628 | 652 |
|
629 | 653 | steps: |
630 | | - - name: Checkout code |
631 | | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
| 654 | + - *checkout-mirror |
| 655 | + - *checkout-plain |
632 | 656 |
|
633 | 657 | - name: Setup workspace |
634 | 658 | uses: ./.github/actions/setup |
|
0 commit comments