nix-github-actions icon indicating copy to clipboard operation
nix-github-actions copied to clipboard

Remove attrPrefix and run the expected check attrs

Open purcell opened this issue 2 years ago • 3 comments

When my PR #4 was merged, I noticed that a build broke for my client repo, in which I was setting "attrPrefix". And I realised that either the intention of "attrPrefix" and the "githubActions.checks" attribute are not clear, or there was an error.

Specifically, I was setting attrPrefix to "", and then the generation Actions yml file was building .#${{matrix.attr}}, so it was trying to build .#x86_64-linux.emacs-24-3, for example, and of course that attribute doesn't exist. But what I expected, and what I think you probably planned, was that the githubActions.checks attribute is used both to generate the matrix, and to run those checks later. After all, I can't see why we'd look in one place for checks to run, and then look them up in a different place later — or perhaps I'm missing something.

Anyway, this suggested change makes everything match up: there's no longer an attrPrefix, and the Action steps run .#githubActions.checks.${{matrix.attr}}.

(Related to #4 and #7.)

purcell avatar Sep 02 '23 15:09 purcell

Reading through the discussion in #4 I am wondering if the full output path for the checks should be: .#githubActions.${{matrix.attr}} instead, dropping the checks part fully.

matrss avatar Jan 03 '24 17:01 matrss

Tbh, in the end I rolled my own code for this, because the nix snippet with my own preferences is pretty trivial: it's the YAML workflow incantation for generating the matrix that's the tricky bit, and including this repo doesn't really help with that directly.

purcell avatar Jan 03 '24 17:01 purcell

I am considering doing the same, since it is so little code and the workflow yaml must be copied over anyway (and kept in sync with potential changes to mkGithubMatrix, like in this PR).

matrss avatar Jan 04 '24 19:01 matrss