Skip to content

ci(health-check-pr): always run, gate work via changed-files#7039

Merged
xmfcx merged 1 commit intomainfrom
ci/health-check-pr-always-run
Apr 20, 2026
Merged

ci(health-check-pr): always run, gate work via changed-files#7039
xmfcx merged 1 commit intomainfrom
ci/health-check-pr-always-run

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Apr 20, 2026

  • Drop the pull_request.paths: filter so the workflow triggers on every PR
  • Add a changed-files job using step-security/changed-files@v47 to detect whether any health-check-relevant path changed
  • Gate require-label on the detection output; health-check cascades via needs:

Why

When a workflow used as a required status check has a trigger-level paths: filter, GitHub does not trigger it on PRs that don't touch those paths. The required check then never appears, and branch protection blocks the PR forever. Skipped jobs satisfy required checks; missing workflows do not, so the workflow now always runs and skips internally instead.


Test plan

  • Open a PR that touches no relevant paths (e.g. only edits a markdown file)
    • health-check-pr / changed-files runs and succeeds
    • health-check-pr / require-label shows as Skipped
    • health-check-pr / health-check shows as Skipped
    • Branch protection treats the required check as satisfied (PR is mergeable)
  • Open a PR that touches docker-new/**, ansible/**, or repositories/*.repos
    • changed-files reports any_changed=true
    • Without the run:health-check label: require-label fails, health-check skips
    • With the run:health-check label: require-label passes, health-check runs the reusable workflow
  • Verify branch protection rules list job-level checks (e.g. health-check-pr / health-check), not the workflow file itself — only per-job skipped checks count as success

Required status checks were blocked when the workflow's `paths:` filter
excluded a PR: the check never appeared, so branch protection waited
forever. Drop `paths:` and gate `require-label` (and transitively
`health-check`) on `step-security/changed-files`. Skipped jobs satisfy
required checks; missing workflows do not.

Signed-off-by: Mete Fatih Cırıt <[email protected]>
@xmfcx xmfcx self-assigned this Apr 20, 2026
@github-actions
Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx xmfcx added the run:health-check Run health-check label Apr 20, 2026
@xmfcx xmfcx requested a review from mitsudome-r April 20, 2026 10:47
@xmfcx xmfcx merged commit d372587 into main Apr 20, 2026
21 of 25 checks passed
@xmfcx xmfcx deleted the ci/health-check-pr-always-run branch April 20, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants