ci: Apply matrix env vars in the workflow, not in custom actions - #95
Merged
Conversation
Matrix entries in .github/versions-matrix.R can carry a generic "env" field (one KEY=VALUE per line). Until now, the rcc-full job only forwarded that field to the custom before-install action as an input, so every repo had to implement the same apply-to-GITHUB_ENV boilerplate in its own .github/workflows/custom/before-install/action.yml — and repos without that boilerplate silently dropped the variables, because composite actions cannot read the matrix context. Apply the "env" field directly in the rcc-full job instead, before the custom before-install action runs, so the variables reach every subsequent step in all repos without any custom amendments. Drop the now-redundant input forwarding. Also escape backslash, double quote, and newline in the JSON emitted by versions-matrix/action.R, so multi-line "env" values (one KEY=VALUE per line) survive the trip through the matrix JSON.
This was referenced Jul 27, 2026
Merged
Merged
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
Matrix entries in
.github/versions-matrix.Rcan carry a genericenvfield(one
KEY=VALUEper line).Until now, the
rcc-fulljob only forwarded that fieldto the custom before-install action as an input:
Because composite actions cannot read the
matrixcontext,every consumer repo had to implement the same apply-to-
$GITHUB_ENVboilerplatein its own
.github/workflows/custom/before-install/action.yml(dm, duckdb-r, and rigraph each carry an identical copy today),
and a repo without that boilerplate silently drops the variables.
The claim that surfaced in igraph/rigraph —
"a before-install action is needed to pick up the environment variable" —
was therefore true for all consumer repos, not just rigraph.
It is an artifact of the template design, not of that repo.
CI logs confirm the failure mode for matrix values
referenced directly inside composite actions:
in cynkra/dm's "SQL Server with covr" job,
DM_TEST_SRC(set from${{ matrix.config.test-src }}inside the composite action)comes out empty, while the forwarded-input route (
DM_VALIDATE=true) works.Fix
envfield directly in thercc-fulljob,before the custom before-install action runs,
so the variables reach every subsequent step —
including the custom before-install and after-install actions —
in all repos, with no custom amendments needed.
envinput forwarding.in the JSON emitted by
versions-matrix/action.R,so multi-line
envvalues (oneKEY=VALUEper line)survive the trip through the matrix JSON.
Companion PRs
envfield dm#2486 — sync + drop boilerplate;also restores the six database-backend runs,
which had been silently testing plain data frames
(branch also pushed to
krlmlr/duckdb-r)documents that its
matrix.config.*-based client/server switches are inert🤖 Generated with Claude Code
https://claude.ai/code/session_0136C9bRMjBGkUrtLdkYNmAg