ci: isolate riscv build failure from non-riscv merge jobs#11
Conversation
A build-riscv failure (e.g. RISE runner outage) previously caused all merge matrix jobs to be skipped. Add a job-level if condition so that only the ubuntu2604 merge job requires build-riscv to succeed; all other targets proceed as long as build-amd64 and build-arm pass. https://claude.ai/code/session_01Nr2cib6QkdXxvTFGWVHurp
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe0d422df2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| always() && | ||
| needs.build-amd64.result == 'success' && | ||
| needs.build-arm.result == 'success' && | ||
| (matrix.target != 'ubuntu2604' || needs.build-riscv.result == 'success') |
There was a problem hiding this comment.
Move matrix-dependent condition out of job if
In GitHub Actions, jobs.<job_id>.if is evaluated before strategy.matrix is applied, so matrix.target is not available in this job-level condition. In the inspected .github/workflows/main.yml merge job, this makes the new condition invalid or unable to distinguish ubuntu2604, so the workflow will not achieve the intended behavior of allowing the other merge targets to continue when build-riscv fails; split the merge jobs or move the target-specific gating to a place where the matrix context exists.
Useful? React with 👍 / 👎.
Summary
ifcondition to themergejob so abuild-riscvfailure (e.g. RISE runner outage) only blocks theubuntu2604merge — all other targets (full,ubuntu2404,ubuntu2204,alpine) continue as long asbuild-amd64andbuild-armpass.Before / after
Before:
build-riscvfailure → all 5mergematrix jobs skippedAfter:
build-riscvfailure → onlyubuntu2604merge skipped; other 4 targets unaffectedCondition logic
Test plan
build-riscvfailure and confirmfull,ubuntu2404,ubuntu2204,alpinemerge jobs still completeubuntu2604merge is correctly skipped whenbuild-riscvfailsGenerated by Claude Code