Skip to content

Commit cce74d2

Browse files
ci: use pre-flight CI workload output
Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
1 parent f41e4f7 commit cce74d2

1 file changed

Lines changed: 7 additions & 23 deletions

File tree

.github/workflows/cicd-main.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
needs: [pre-flight]
6464
outputs:
6565
test_to_run: ${{ steps.test_to_run.outputs.main }}
66-
is_ci_workload: ${{ steps.is_ci_workload.outputs.main }}
6766
no_fail_fast: ${{ steps.no_fail_fast.outputs.main }}
6867
components_to_run: ${{ steps.components_to_run.outputs.main }}
6968
run_nightly: ${{ steps.pr_labels.outputs.run_nightly }}
@@ -102,21 +101,6 @@ jobs:
102101
parsed_string=$(echo "$TESTS_TO_RUN" | jq -c --raw-input 'split(",")')
103102
echo "main=${parsed_string}" | tee -a "$GITHUB_OUTPUT"
104103
105-
- name: Check if this is a CI workload
106-
shell: bash
107-
id: is_ci_workload
108-
run: |
109-
branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
110-
111-
if [[ "$branch_name" =~ ^bump-ci-container || "$EVENT_NAME" == "schedule" ]]; then
112-
is_ci_workload=true
113-
echo "main=true" | tee -a "$GITHUB_OUTPUT"
114-
else
115-
is_ci_workload=false
116-
fi
117-
118-
echo "main=$is_ci_workload" | tee -a "$GITHUB_OUTPUT"
119-
120104
- name: Fetch PR labels
121105
id: pr_labels
122106
env:
@@ -158,13 +142,13 @@ jobs:
158142
skip_linting: ${{ needs.configure.outputs.skip_linting }}
159143

160144
cicd-wait-in-queue:
161-
needs: [configure, code-linting]
145+
needs: [pre-flight, configure, code-linting]
162146
runs-on: ubuntu-latest
163147
environment: test
164148
if: |
165149
needs.configure.outputs.test_to_run != '[]'
166150
&& needs.configure.outputs.components_to_run != '[]'
167-
&& needs.configure.outputs.is_ci_workload == 'false'
151+
&& needs.pre-flight.outputs.is_ci_workload == 'false'
168152
steps:
169153
- name: Running CI tests
170154
run: |
@@ -180,7 +164,7 @@ jobs:
180164
success()
181165
|| (
182166
needs.cicd-wait-in-queue.result == 'skipped'
183-
&& needs.configure.outputs.is_ci_workload == 'true'
167+
&& needs.pre-flight.outputs.is_ci_workload == 'true'
184168
)
185169
)
186170
&& !cancelled()
@@ -198,7 +182,7 @@ jobs:
198182
success()
199183
|| (
200184
needs.cicd-wait-in-queue.result == 'skipped'
201-
&& needs.configure.outputs.is_ci_workload == 'true'
185+
&& needs.pre-flight.outputs.is_ci_workload == 'true'
202186
)
203187
)
204188
&& !cancelled()
@@ -243,7 +227,7 @@ jobs:
243227
success()
244228
|| (
245229
needs.cicd-wait-in-queue.result == 'skipped'
246-
&& needs.configure.outputs.is_ci_workload == 'true'
230+
&& needs.pre-flight.outputs.is_ci_workload == 'true'
247231
)
248232
)
249233
&& !cancelled()
@@ -274,7 +258,7 @@ jobs:
274258
success()
275259
|| (
276260
needs.cicd-wait-in-queue.result == 'skipped'
277-
&& needs.configure.outputs.is_ci_workload == 'true'
261+
&& needs.pre-flight.outputs.is_ci_workload == 'true'
278262
)
279263
)
280264
&& !cancelled()
@@ -297,7 +281,7 @@ jobs:
297281
success()
298282
|| (
299283
needs.cicd-wait-in-queue.result == 'skipped'
300-
&& needs.configure.outputs.is_ci_workload == 'true'
284+
&& needs.pre-flight.outputs.is_ci_workload == 'true'
301285
)
302286
)
303287
&& !cancelled()

0 commit comments

Comments
 (0)