Rename version input to cli-version

This commit is contained in:
Volodymyr Zotov
2025-08-14 10:58:58 -05:00
parent 438a01224c
commit b9110a4b5b
2 changed files with 4 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ inputs:
export-env:
description: Export the secrets as environment variables
default: "false"
version:
cli-version:
description: Specify which 1Password CLI version to install. Defaults to "latest".
default: "latest"
runs:

View File

@@ -44,7 +44,9 @@ const installCLI = async (): Promise<void> => {
// If there's no CLI installed, then validateCli will throw an error, which we will use
// as an indicator that we need to execute the installation script.
await validateCli().catch(async () => {
await installCliOnGithubActionRunner();
// defaults to `latest` if not provided
const cliVersion = core.getInput("cli-version");
await installCliOnGithubActionRunner(cliVersion);
});
};