@samitouri / QOS-React / commits / 9463d51e51

Update runtime workflow to use HEAD commit (#31850)

This updates the CI workflow for the runtime build and tests to use the HEAD commit of the PR branch rather than the Fake News merge commit that the `@actions/checkout` action bafflingly defaults to. Testing against the merge commit never made sense to me as a behavior because as soon as someone updates upstream, it's out of date anyway. It should just match the exact commit that the developer pushed, and the once that appears in the GitHub UI.

Andrew Clark committed Dec 19, 2024 at 10:18 UTC 9463d51e515544bb3119dd4cec46ce2177cf4c62
1 file changed +32
.github/workflows/runtime_build_and_test.yml
+32
@@ -25,6 +25,8 @@ jobs:
25 matrix: ${{ steps.set-matrix.outputs.result }}
26 steps:
27 - uses: actions/checkout@v4
28 + with:
29 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
30 - uses: actions/github-script@v7
31 id: set-matrix
32 with:
@@ -42,6 +44,8 @@ jobs:
44 flow_inline_config_shortname: ${{ fromJSON(needs.discover_flow_inline_configs.outputs.matrix) }}
45 steps:
46 - uses: actions/checkout@v4
47 + with:
48 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
49 - uses: actions/setup-node@v4
50 with:
51 node-version-file: '.nvmrc'
@@ -64,6 +68,8 @@ jobs:
68 runs-on: ubuntu-latest
69 steps:
70 - uses: actions/checkout@v4
71 + with:
72 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
73 - uses: actions/setup-node@v4
74 with:
75 node-version-file: '.nvmrc'
@@ -88,6 +94,8 @@ jobs:
94 runs-on: ubuntu-latest
95 steps:
96 - uses: actions/checkout@v4
97 + with:
98 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
99 - uses: actions/setup-node@v4
100 with:
101 node-version-file: '.nvmrc'
@@ -139,6 +147,8 @@ jobs:
147 continue-on-error: true
148 steps:
149 - uses: actions/checkout@v4
150 + with:
151 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
152 - uses: actions/setup-node@v4
153 with:
154 node-version-file: '.nvmrc'
@@ -166,6 +176,8 @@ jobs:
176 release_channel: [stable, experimental]
177 steps:
178 - uses: actions/checkout@v4
179 + with:
180 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
181 - uses: actions/setup-node@v4
182 with:
183 node-version-file: '.nvmrc'
@@ -242,6 +254,8 @@ jobs:
254 runs-on: ubuntu-latest
255 steps:
256 - uses: actions/checkout@v4
257 + with:
258 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
259 - uses: actions/setup-node@v4
260 with:
261 node-version-file: '.nvmrc'
@@ -272,6 +286,8 @@ jobs:
286 runs-on: ubuntu-latest
287 steps:
288 - uses: actions/checkout@v4
289 + with:
290 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
291 - uses: actions/setup-node@v4
292 with:
293 node-version-file: '.nvmrc'
@@ -317,6 +333,8 @@ jobs:
333 runs-on: ubuntu-latest
334 steps:
335 - uses: actions/checkout@v4
336 + with:
337 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
338 - uses: actions/setup-node@v4
339 with:
340 node-version-file: '.nvmrc'
@@ -350,6 +368,8 @@ jobs:
368 runs-on: ubuntu-latest
369 steps:
370 - uses: actions/checkout@v4
371 + with:
372 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
373 - uses: actions/setup-node@v4
374 with:
375 node-version-file: '.nvmrc'
@@ -380,6 +400,8 @@ jobs:
400 runs-on: ubuntu-latest
401 steps:
402 - uses: actions/checkout@v4
403 + with:
404 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
405 - uses: actions/setup-node@v4
406 with:
407 node-version-file: '.nvmrc'
@@ -419,6 +441,8 @@ jobs:
441 runs-on: ubuntu-latest
442 steps:
443 - uses: actions/checkout@v4
444 + with:
445 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
446 - uses: actions/setup-node@v4
447 with:
448 node-version-file: '.nvmrc'
@@ -480,6 +504,8 @@ jobs:
504 runs-on: ubuntu-latest
505 steps:
506 - uses: actions/checkout@v4
507 + with:
508 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
509 - uses: actions/setup-node@v4
510 with:
511 node-version-file: '.nvmrc'
@@ -528,6 +554,8 @@ jobs:
554 runs-on: ubuntu-latest
555 steps:
556 - uses: actions/checkout@v4
557 + with:
558 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
559 - uses: actions/setup-node@v4
560 with:
561 node-version-file: '.nvmrc'
@@ -562,6 +590,8 @@ jobs:
590 runs-on: ubuntu-latest
591 steps:
592 - uses: actions/checkout@v4
593 + with:
594 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
595 - uses: actions/setup-node@v4
596 with:
597 node-version-file: '.nvmrc'
@@ -603,6 +633,8 @@ jobs:
633 runs-on: ubuntu-latest
634 steps:
635 - uses: actions/checkout@v4
636 + with:
637 + ref: ${{ github.event.pull_request.head.sha || github.sha }}
638 - uses: actions/setup-node@v4
639 with:
640 node-version-file: '.nvmrc'