ci(health-check): lift matrix to callers and add run-condition gate#7056
Merged
ci(health-check): lift matrix to callers and add run-condition gate#7056
Conversation
Two related refactors to the health-check workflow pair: - Move the build-type/platform/runner matrix out of health-check-reusable and into each caller (health-check on main/schedule/dispatch, and health-check-pr on PRs). The reusable now takes build-type, platform and runner as inputs, so callers can tailor the matrix independently. - Add a run-condition input (default true) and gate the reusable job with if: inputs.run-condition. health-check-pr always fires the matrix and passes run-condition derived from its changed-files + require-label gates, so required status checks always report (the inner job just skips cleanly when gated off). Same pattern is already used by autoware_universe's build-and-test-packages-above-differential. Note: the required status check name changes from 'health-check / docker-build (main)' to 'health-check (main) / docker-build'. Branch protection on main must be updated to require the new name. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Adds a terminal gate job that depends on install-dev-env and passes when the matrix succeeded or skipped. Branch protection can require install-dev-env-required instead of the individual matrix legs, so PRs that gate off (no matching paths or missing label) still satisfy the required check. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
mitsudome-r
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build-type/platform/runnermatrix out of health-check-reusable.yaml and into each caller (health-check.yaml, health-check-pr.yaml); the reusable now takesbuild-type,platform, andrunneras inputs so callers can tailor the matrix independently.run-conditioninput (defaulttrue) and gate the reusable'sdocker-buildjob withif: inputs.run-condition;health-check-pralways fires the matrix and derivesrun-conditionfrom itschanged-files+require-labelgates.Why
Before & After

Branch protection requires the health-check matrix jobs to report, but
health-check-prwas skipping the whole job when a PR touched none of the watched paths, leaving required checks stuck onExpected — Waiting for status to be reported. Always-firing the matrix with an internalrun-conditiongate lets the inner job skip cleanly while still reporting a completed status, matching the pattern already used by autoware_universe's build-and-test-packages-above-differential. Lifting the matrix to callers is a natural follow-on so each trigger (main push / schedule / PR) can choose its own matrix shape.health-check / docker-build (main)tohealth-check (main) / docker-build(the matrix axis now appears on the outer caller job). Themainbranch protection rule must be updated to require the new name; otherwise merges will block on the old, never-reported check.Test plan
run:health-checklabel; confirmhealth-check (main) / docker-build,health-check (nightly) / docker-build, andhealth-check (main-arm64) / docker-buildall report success (matrix fires, inner job skips onrun-condition: false).run:health-checklabel; confirm the same three jobs re-run and actually execute the build steps (non-trivial runtime, BuildKit cache restore visible in logs).Expected.health-check.yamlonmainstill executes all three matrix legs end-to-end (norun-conditiondefault changes its behavior).mainhas been updated to requirehealth-check (main) / docker-build(and any other legs that were previously required) before merging this PR.