Fix homelab-plan required check blocking non-homelab PRs - #18
Merged
Conversation
The homelab-plan check is required by branch protection (homelab/locals.tf), but its workflow was path-filtered to homelab/**. PRs that don't touch homelab/ (docs-only, cloudflare-only, lint-only) never triggered it, so the required check sat permanently at "Expected — Waiting for status to be reported" and blocked merge. Drop the path filter so the workflow always runs and reports homelab-plan, and gate the expensive tofu steps on a dorny/paths-filter detection instead — a job whose steps are all skipped still reports success, satisfying branch protection without running tofu on unrelated PRs.
|
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.
Problem
homelab-planis a required status check (homelab/locals.tf→required_status_check_contexts = ["homelab-plan"]), but its workflow was path-filtered tohomelab/**. Any PR that doesn't touchhomelab/— docs-only, cloudflare-only, lint-only (e.g. #17) — never triggers the workflow, so the required check stays stuck at "Expected — Waiting for status to be reported" and the PR can't merge. The status isn't even clickable because no Actions run exists behind it.Fix
Remove the
paths:filter so the workflow runs on every PR and always reportshomelab-plan, then gate the expensive tofu steps (init/validate/plan) on adorny/paths-filter@v3detection. On PRs that don't touchhomelab/, every gated step is skipped and the job reports green in seconds — no tofu, no cloud creds. On PRs that do, it runs the full plan exactly as before.After this merges
#17 needs its branch updated to pick up this workflow (pull_request runs the workflow from the head branch), after which
homelab-planwill report a green skip and #17 becomes mergeable normally.