Skip to content

Combine renovate fix + nix-checks into one sequenced workflow#417

Merged
jupblb merged 2 commits into
mainfrom
michal/combine-ci
May 14, 2026
Merged

Combine renovate fix + nix-checks into one sequenced workflow#417
jupblb merged 2 commits into
mainfrom
michal/combine-ci

Conversation

@jupblb
Copy link
Copy Markdown
Collaborator

@jupblb jupblb commented May 14, 2026

Renovate dep-bump PRs need post-processing (per-module go mod tidy and nix-update of vendor hashes) before the Nix checks can build them. Today this happens in two parallel workflows: the doomed nix-checks run starts at the same time as the fix and shows red until the fix re-triggers it.

@jupblb jupblb requested review from eseliger and trly May 14, 2026 05:40
jupblb added 2 commits May 14, 2026 14:18
Renovate dep-bump PRs need post-processing (per-module `go mod tidy`
and `nix-update` of vendor hashes) before the Nix checks can build
them. Today this happens in two parallel workflows: the doomed
nix-checks run starts at the same time as the fix and shows red until
the fix re-triggers it.

Combine them into a single ci workflow with proper ordering:

  fix --> list --> {checks, packages} --> ci-pass

The fix job uses dorny/paths-filter to cheaply detect whether the PR
touches any of the files we know how to fix; if not, the rest of the
job no-ops and downstream jobs run normally. If the fix pushes
corrective commits, downstream jobs are skipped — the resulting
`pull_request synchronize` triggers a fresh CI run on the corrected
SHA that does the actual validation.

A new `ci-pass` aggregator (always() + needs all four) is the single
required status check for branch protection: it passes when either
the fix pushed (next run validates) or every downstream job
succeeded. Skipped fix (forks) or empty-fix paths fall through to
the downstream-result check, so non-Renovate PRs behave exactly as
before.

Supersedes the standalone update-vendor-hash / fix-renovate-prs
workflow and the standalone nix-checks workflow; both files are
removed.
- list now only checks needs.fix.outputs.pushed != true; if fix failed
  or was cancelled, list is skipped (default needs behavior) and
  ci-pass fails on the failure/cancelled result.
- drop redundant if: needs.list.result == success on checks/packages;
  needs already short-circuits when list is skipped/failed.
- collapse ci-pass to a contains(needs.*.result, ...) one-liner; the
  previous shell logic for distinguishing fix-pushed vs all-passed is
  unnecessary because a fix push retriggers CI on the new SHA and
  branch protection on the PR HEAD blocks merge until that succeeds.
@jupblb jupblb force-pushed the michal/combine-ci branch from 7857fad to 6670810 Compare May 14, 2026 12:18
Copy link
Copy Markdown

@trly trly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Branch protection rules will need to get updated to address the change from nix-checks-pass to ci-pass

@jupblb jupblb enabled auto-merge (squash) May 14, 2026 15:22
@jupblb jupblb merged commit c7792c7 into main May 14, 2026
15 checks passed
@jupblb jupblb deleted the michal/combine-ci branch May 14, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants