mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-04-20 17:00:16 +03:00
20 lines
483 B
TypeScript
20 lines
483 B
TypeScript
// 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-lockfile-summary",
|
|
`"${commitMessage}"`,
|
|
]);
|
|
}
|