Add JS-specific bits to Actions
This commit is contained in:
parent
539b7a6481
commit
239b4c9810
8 changed files with 1036 additions and 82 deletions
src
20
src/nix.ts
Normal file
20
src/nix.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Build the Nix args out of inputs from the Actions environment
|
||||
export function makeNixCommandArgs(
|
||||
nixOptions: string[],
|
||||
flakeInputs: string[],
|
||||
commitMessage: string,
|
||||
): string[] {
|
||||
const flakeInputFlags = flakeInputs.flatMap((input) => [
|
||||
"--update-input",
|
||||
input,
|
||||
]);
|
||||
|
||||
return nixOptions
|
||||
.concat(["flake", "lock"])
|
||||
.concat(flakeInputFlags)
|
||||
.concat([
|
||||
"--commit-lock-file",
|
||||
"--commit-lock-file-summary",
|
||||
`"${commitMessage}"`,
|
||||
]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue