66 pull_request :
77 paths-ignore :
88 - compiler/**
9+ workflow_dispatch :
10+ inputs :
11+ commit_sha :
12+ required : false
13+ type : string
14+ default : ' '
915
1016permissions : {}
1117
2834 steps :
2935 - uses : actions/checkout@v4
3036 with :
31- ref : ${{ github.event.pull_request.head.sha || github.sha }}
37+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
3238 - name : Check cache hit
3339 uses : actions/cache/restore@v4
3440 id : node_modules
6975 steps :
7076 - uses : actions/checkout@v4
7177 with :
72- ref : ${{ github.event.pull_request.head.sha || github.sha }}
78+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
7379 - name : Check cache hit
7480 uses : actions/cache/restore@v4
7581 id : node_modules
@@ -117,7 +123,7 @@ jobs:
117123 steps :
118124 - uses : actions/checkout@v4
119125 with :
120- ref : ${{ github.event.pull_request.head.sha || github.sha }}
126+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
121127 - uses : actions/github-script@v7
122128 id : set-matrix
123129 with :
@@ -136,7 +142,7 @@ jobs:
136142 steps :
137143 - uses : actions/checkout@v4
138144 with :
139- ref : ${{ github.event.pull_request.head.sha || github.sha }}
145+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
140146 - uses : actions/setup-node@v4
141147 with :
142148 node-version-file : ' .nvmrc'
@@ -166,7 +172,7 @@ jobs:
166172 steps :
167173 - uses : actions/checkout@v4
168174 with :
169- ref : ${{ github.event.pull_request.head.sha || github.sha }}
175+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
170176 - uses : actions/setup-node@v4
171177 with :
172178 node-version-file : ' .nvmrc'
@@ -198,7 +204,7 @@ jobs:
198204 steps :
199205 - uses : actions/checkout@v4
200206 with :
201- ref : ${{ github.event.pull_request.head.sha || github.sha }}
207+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
202208 - uses : actions/setup-node@v4
203209 with :
204210 node-version-file : ' .nvmrc'
@@ -254,7 +260,7 @@ jobs:
254260 steps :
255261 - uses : actions/checkout@v4
256262 with :
257- ref : ${{ github.event.pull_request.head.sha || github.sha }}
263+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
258264 - uses : actions/setup-node@v4
259265 with :
260266 node-version-file : ' .nvmrc'
@@ -325,7 +331,7 @@ jobs:
325331 steps :
326332 - uses : actions/checkout@v4
327333 with :
328- ref : ${{ github.event.pull_request.head.sha || github.sha }}
334+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
329335 - uses : actions/setup-node@v4
330336 with :
331337 node-version-file : ' .nvmrc'
@@ -420,7 +426,7 @@ jobs:
420426 steps :
421427 - uses : actions/checkout@v4
422428 with :
423- ref : ${{ github.event.pull_request.head.sha || github.sha }}
429+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
424430 - uses : actions/setup-node@v4
425431 with :
426432 node-version-file : ' .nvmrc'
@@ -465,7 +471,7 @@ jobs:
465471 steps :
466472 - uses : actions/checkout@v4
467473 with :
468- ref : ${{ github.event.pull_request.head.sha || github.sha }}
474+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
469475 - uses : actions/setup-node@v4
470476 with :
471477 node-version-file : ' .nvmrc'
@@ -493,7 +499,7 @@ jobs:
493499 merge-multiple : true
494500 - name : Display structure of build
495501 run : ls -R build
496- - run : echo ${{ github.event.pull_request.head.sha || github.sha }} >> build/COMMIT_SHA
502+ - run : echo ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }} >> build/COMMIT_SHA
497503 - name : Scrape warning messages
498504 run : |
499505 mkdir -p ./build/__test_utils__
@@ -530,7 +536,7 @@ jobs:
530536 steps :
531537 - uses : actions/checkout@v4
532538 with :
533- ref : ${{ github.event.pull_request.head.sha || github.sha }}
539+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
534540 - uses : actions/setup-node@v4
535541 with :
536542 node-version-file : ' .nvmrc'
@@ -570,7 +576,7 @@ jobs:
570576 steps :
571577 - uses : actions/checkout@v4
572578 with :
573- ref : ${{ github.event.pull_request.head.sha || github.sha }}
579+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
574580 - uses : actions/setup-node@v4
575581 with :
576582 node-version-file : ' .nvmrc'
@@ -607,7 +613,7 @@ jobs:
607613 steps :
608614 - uses : actions/checkout@v4
609615 with :
610- ref : ${{ github.event.pull_request.head.sha || github.sha }}
616+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
611617 - uses : actions/setup-node@v4
612618 with :
613619 node-version-file : ' .nvmrc'
@@ -648,7 +654,7 @@ jobs:
648654 steps :
649655 - uses : actions/checkout@v4
650656 with :
651- ref : ${{ github.event.pull_request.head.sha || github.sha }}
657+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
652658 - uses : actions/setup-node@v4
653659 with :
654660 node-version-file : ' .nvmrc'
@@ -722,7 +728,7 @@ jobs:
722728 steps :
723729 - uses : actions/checkout@v4
724730 with :
725- ref : ${{ github.event.pull_request.head.sha || github.sha }}
731+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
726732 - uses : actions/setup-node@v4
727733 with :
728734 node-version-file : ' .nvmrc'
@@ -779,7 +785,7 @@ jobs:
779785 steps :
780786 - uses : actions/checkout@v4
781787 with :
782- ref : ${{ github.event.pull_request.head.sha || github.sha }}
788+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
783789 - uses : actions/setup-node@v4
784790 with :
785791 node-version-file : ' .nvmrc'
@@ -824,7 +830,7 @@ jobs:
824830 steps :
825831 - uses : actions/checkout@v4
826832 with :
827- ref : ${{ github.event.pull_request.head.sha || github.sha }}
833+ ref : ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }}
828834 - uses : actions/setup-node@v4
829835 with :
830836 node-version-file : ' .nvmrc'
@@ -873,7 +879,7 @@ jobs:
873879 node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
874880 - name : Display structure of build for PR
875881 run : ls -R build
876- - run : echo ${{ github.event.pull_request.head.sha || github.sha }} >> build/COMMIT_SHA
882+ - run : echo ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event. pull_request.head.sha || github.sha }} >> build/COMMIT_SHA
877883 - run : node ./scripts/tasks/danger
878884 - name : Archive sizebot results
879885 uses : actions/upload-artifact@v4
0 commit comments