2024-04-26 14:19:53 -03:00
|
|
|
// 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",
|
2024-05-06 17:45:12 -04:00
|
|
|
"--commit-lockfile-summary",
|
2024-04-26 14:19:53 -03:00
|
|
|
`"${commitMessage}"`,
|
|
|
|
]);
|
|
|
|
}
|