@@ -4,91 +4,27 @@ name: Workflow - Pull Request Main (merge)
44
55on :
66 workflow_dispatch :
7- schedule :
8- - cron : " 0 0 * * *"
7+ merge_group :
98
109jobs :
1110 # ========================================================================= #
12- # SCHEDULE GATE #
13- # ========================================================================= #
14-
15- check-merged-today :
16- name : Check commits merged in previous UTC day
17- runs-on : ubuntu-latest
18- outputs :
19- should_run : ${{ steps.check.outputs.should_run }}
20- steps :
21- - name : Checkout
22- uses : actions/checkout@v4
23- with :
24- fetch-depth : 0
25- - name : Check commits on main in previous UTC day
26- id : check
27- shell : bash
28- run : |
29- set -euo pipefail
30- SINCE="$(date -u -d 'yesterday 00:00' +%Y-%m-%dT%H:%M:%SZ)"
31- UNTIL="$(date -u -d 'today 00:00' +%Y-%m-%dT%H:%M:%SZ)"
32- git fetch origin main --prune
33- COUNT="$(git rev-list --count --since="$SINCE" --until="$UNTIL" origin/main)"
34- if [ "$COUNT" -gt 0 ]; then
35- echo "should_run=true" >> "$GITHUB_OUTPUT"
36- else
37- echo "should_run=false" >> "$GITHUB_OUTPUT"
38- fi
39- # ========================================================================= #
4011 # NIGHTLY RELEASE #
4112 # ========================================================================= #
4213
4314 build-nightly-and-publish-madara :
44- uses : ./.github/workflows/task-build-nightly-and-publish.yml
45- with :
46- image-name : madara
47- image-file : ./madara/Dockerfile
48- needs : [check-merged-today]
49- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
50- permissions :
51- contents : read
52- packages : write
53- attestations : write
54- id-token : write
55- secrets : inherit
15+ if : github.event.pull_request.draft == false
16+ uses : ./.github/workflows/task-do-nothing-build-nightly-and-publish.yml
5617
5718 # test-hive:
58- # needs: [build-nightly]
59- # uses: ./.github/workflows/task-test-hive.yml
60- # with:
61- # nightly-sha: ${{ needs.build-nightly.outputs.nightly-sha }}
62- # secrets: inherit
19+ # uses: ./.github/workflows/task-do-nothing-test-hive.yml
6320
6421 build-nightly-and-publish-orchestrator :
65- uses : ./.github/workflows/task-build-nightly-and-publish.yml
66- with :
67- image-name : orchestrator
68- image-file : ./orchestrator/Dockerfile
69- needs : [check-merged-today]
70- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
71- permissions :
72- contents : read
73- packages : write
74- attestations : write
75- id-token : write
76- secrets : inherit
22+ if : github.event.pull_request.draft == false
23+ uses : ./.github/workflows/task-do-nothing-build-nightly-and-publish.yml
7724
78- # Deprecating bootstrapper V1
7925 build-nightly-and-publish-bootstrapper :
80- uses : ./.github/workflows/task-build-nightly-and-publish.yml
81- with :
82- image-name : bootstrapper
83- image-file : ./bootstrapper/Dockerfile
84- needs : [check-merged-today]
85- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
86- permissions :
87- contents : read
88- packages : write
89- attestations : write
90- id-token : write
91- secrets : inherit
26+ if : github.event.pull_request.draft == false
27+ uses : ./.github/workflows/task-do-nothing-build-nightly-and-publish.yml
9228
9329 # ========================================================================= #
9430 # MERGE QUEUE #
@@ -118,36 +54,6 @@ jobs:
11854 # E2E Test #
11955 # ========================================================================= #
12056
121- # Build Madara binary
122- build-madara :
123- uses : ./.github/workflows/task-build-madara.yml
124- needs : [check-merged-today]
125- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
126- secrets : inherit
127-
128- # Build Orchestrator binary
129- build-orchestrator :
130- uses : ./.github/workflows/task-build-orchestrator.yml
131- needs : [check-merged-today]
132- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
133- secrets : inherit
134-
135- # Build Bootstrapper binary
136- build-bootstrapper :
137- uses : ./.github/workflows/task-build-bootstrapper.yml
138- needs : [check-merged-today]
139- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
140- secrets : inherit
141-
142- # End-to-end tests
14357 test-end-to-end :
144- needs :
145- [check-merged-today, build-madara, build-orchestrator, build-bootstrapper]
146- if : github.event_name != 'schedule' || needs.check-merged-today.outputs.should_run == 'true'
147- uses : ./.github/workflows/task-test-end-to-end.yml
148- with :
149- madara-binary-hash : ${{ needs.build-madara.outputs.madara-binary-hash }}
150- orchestrator-binary-hash : ${{ needs.build-orchestrator.outputs.orchestrator-binary-hash }}
151- bootstrapper-binary-hash : ${{ needs.build-bootstrapper.outputs.bootstrapper-binary-hash }}
152- cairo-artifacts-hash : ${{ needs.build-madara.outputs.cairo-artifacts-hash }}
153- secrets : inherit
58+ if : github.event.pull_request.draft == false
59+ uses : ./.github/workflows/task-do-nothing-test-end-to-end.yml
0 commit comments