ci(health-check): run on push to main + split into pr / main / reusable#7030
ci(health-check): run on push to main + split into pr / main / reusable#7030
Conversation
Disentangle the three-mode gating in a single workflow file by splitting it into dedicated workflows per trigger plus a shared reusable job, and add a `push: main` trigger so the shared registry cache gets populated on merges. Previously `health-check.yaml` mixed `pull_request`, `schedule`, and `workflow_dispatch` behind ~10 repeated per-step conditionals (`steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'`). The conditional thicket made the file hard to read and silently skipped label-gated PRs when `run:health-check` was absent. Also: the docker-bake step reads from `:health-check-*-main` as a fallback cache ref, but that ref was only written on PR/schedule/ dispatch runs — never on `push: main` — so merges never warmed the cache for subsequent PRs. - `health-check-reusable.yaml` (new): `workflow_call` with the matrix docker build job. Step-level `if:`s reduced to the genuinely orthogonal matrix filters (`build-type != 'main'`, `platform == 'arm64'`, `build-type == 'nightly'`). No label or paths logic. - `health-check-pr.yaml` (new): `pull_request` trigger with `paths:` filter at the trigger level (replaces the per-step `changed-files` gate). Uses `require-label.yaml@v1` which exits 1 on missing label, so a watched-path PR without `run:health-check` turns red instead of silently skipping. Calls the reusable on success. - `health-check.yaml`: trimmed to `push: main`, `schedule`, and `workflow_dispatch`. No label check, no paths filter; directly calls the reusable. Purpose is to keep populating the shared `:health-check-*-main` BuildKit registry cache for PRs to read. Net: ~10 repeated `if:` conditionals removed, the `changed-files` step removed, each trigger mode expressed in its own file, and the main cache gets written on every merge. Signed-off-by: Mete Fatih Cırıt <[email protected]>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
@mitsudome-r I also updated the required workflow accordingly 👍 |
The previous commit dropped the `scenario-test` job from `health-check.yaml`, which was the sole caller of `scenario-test-reusable.yaml`. Nothing else in the repo references it (grep confirms only the `name:` line remains). Delete the file so the workflows directory reflects the live pipeline. Signed-off-by: Mete Fatih Cırıt <[email protected]>
What
|
|
@mitsudome-r also it will work faster with the new images because cyclonedds and other dds optimizations are done properly in the new images 🐇 as long as you run through the /entrypoint.sh |

push: maintrigger tohealth-check.yamlso merges populate the:health-check-*-mainregistry cache — previously it only ran on PR/schedule/dispatch, starving subsequent PRs of warm layers.health-check-pr.yaml(new):pull_requestwithpaths:at the trigger level +require-label.yaml@v1gate, calls the reusable on success.paths:replaces the per-stepchanged-filesconditional; the hard label gate turns a watched-path PR withoutrun:health-checkred instead of silently skipping.health-check-reusable.yaml(new):workflow_callwith the matrix docker-build job; step-levelif:s reduced to orthogonal matrix filters (build-type != 'main',platform == 'arm64',build-type == 'nightly').health-check.yaml(trimmed):push: main,schedule,workflow_dispatch, calls the reusable.scenario-testdownstream job from the PR path along with thedocker save+upload-artifactsteps that fed it andload: trueon the bake step (only needed for the save).scenario-test-reusable.yamlis deleted in the same PR since nothing else referenced it. Merge-time scenario coverage is unaffected: the standalonescenario-test.yaml(cron +push: main+workflow_dispatch) still runs and does not use the reusable.if:conditionals gone; thechanged-filesstep gone; each trigger mode expressed in its own file.Why
The previous single-file workflow mixed
pull_request/schedule/workflow_dispatchbehind identical per-step guards. Untangling them into trigger-specific files removes the conditional thicket, makes the label gate hard-fail (red) instead of silent-skip, and letspush: mainruns keep warming the shared BuildKit registry cache that PR builds read as their fallback. Scenario-test is dropped from the PR path (and its now-orphaned reusable deleted) so that restructuring doesn't have to carry the artifact save/upload round-trip; the standalone merge-time scenario workflow still exercises the same coverage, and a PR-gated form will be brought back in a follow-up once its shape is reworked.buildkit-cache-danceinjection) is intentionally held back to the next PR so this one stays focused on trigger restructuring + PR-path scenario-test removal.Test plan
docker-new/**without therun:health-checklabel: expecthealth-check-pr / require-labelred and the reusable job skipped.require-labelgreen, the reusable workflow (docker-buildmatrix) running; confirm noscenario-testjob appears in the run.main: expecthealth-check / health-checkto run with no label gate, populatingghcr.io/${{ github.repository }}-buildcache-new:*-maintags, andscenario-testto run independently as before.health-checkvia the Actions UI (workflow_dispatch): expect the reusable job to run without a label.grep -r scenario-test-reusable .github/returns nothing.