ci: guard the build/release matrix to workflow_dispatch only - #3
Merged
Merged
Conversation
The `build` job runs `cargo build --release` per-target to produce Codeberg release artifacts, but — unlike its `release` sibling — it carried no `if: github.event_name == 'workflow_dispatch'` guard, so it ran on every push and PR. On a `pull_request` run `github.ref_name` is `N/merge` (`refs/pull/N/merge`), so `VERSION="N/merge"` and `cp ... dist/jj-vine-<target>-N/merge` fails (`No such file or directory` — the `/` is a path separator). This fork is consumed only as a Nix flake input built from source (fenix + rustPlatform), never as a published Codeberg binary, so the release matrix is dead weight on automatic triggers. Guard `build` to `workflow_dispatch` (the same condition `release` already uses). `test` stays on push/PR as the real CI.
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.
The
buildjob runscargo build --releaseper-target to produce Codebergrelease artifacts, but — unlike its
releasesibling — it carried noif: github.event_name == 'workflow_dispatch'guard, so it ran on every pushand PR. On a
pull_requestrungithub.ref_nameisN/merge(
refs/pull/N/merge), soVERSION="N/merge"andcp ... dist/jj-vine-<target>-N/mergefails (
No such file or directory— the/is a path separator).This fork is consumed only as a Nix flake input built from source (fenix +
rustPlatform), never as a published Codeberg binary, so the release matrix is
dead weight on automatic triggers. Guard
buildtoworkflow_dispatch(thesame condition
releasealready uses).teststays on push/PR as the real CI.CI dependency: the
Testjob on this PR is red onconfig::tests::resolved_token_errors_on_non_utf8_output— that is fixed by PR #1 (test(config): make non-UTF-8 token fixture portable), not by this PR. This PR correctly makesbuild/releaseskip on PR runs (verified: both skipped here). Test goes green once PR #1 merges and this rebases onto it. Land order: #1 then #3.