mirror of
https://github.com/redhat-actions/podman-login.git
synced 2025-02-23 10:31:21 +01:00
Add tls-verify to inputs
Signed-off-by: aleskxyz <39186039+aleskxyz@users.noreply.github.com>
This commit is contained in:
parent
4934294ad0
commit
bbf742ca6e
5 changed files with 16 additions and 2 deletions
|
@ -14,6 +14,10 @@ inputs:
|
||||||
password:
|
password:
|
||||||
description: 'Password, encrypted password, or access token for username'
|
description: 'Password, encrypted password, or access token for username'
|
||||||
required: true
|
required: true
|
||||||
|
tls-verify:
|
||||||
|
description: 'Verify TLS certificates when contacting the registry'
|
||||||
|
required: false
|
||||||
|
default: 'true'
|
||||||
auth_file_path:
|
auth_file_path:
|
||||||
description: 'Path of the authentication file, this will override the default auth file path in podman'
|
description: 'Path of the authentication file, this will override the default auth file path in podman'
|
||||||
required: false
|
required: false
|
||||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -25,6 +25,12 @@ export enum Inputs {
|
||||||
* Default: None.
|
* Default: None.
|
||||||
*/
|
*/
|
||||||
REGISTRY = "registry",
|
REGISTRY = "registry",
|
||||||
|
/**
|
||||||
|
* Verify TLS certificates when contacting the registry
|
||||||
|
* Required: false
|
||||||
|
* Default: "true"
|
||||||
|
*/
|
||||||
|
TLS_VERIFY = "tls-verify",
|
||||||
/**
|
/**
|
||||||
* Username to log in against the container image registry
|
* Username to log in against the container image registry
|
||||||
* Required: true
|
* Required: true
|
||||||
|
|
|
@ -34,6 +34,7 @@ async function run(): Promise<void> {
|
||||||
registry = core.getInput(Inputs.REGISTRY, { required: true });
|
registry = core.getInput(Inputs.REGISTRY, { required: true });
|
||||||
let username = core.getInput(Inputs.USERNAME, { required: true });
|
let username = core.getInput(Inputs.USERNAME, { required: true });
|
||||||
let password = core.getInput(Inputs.PASSWORD, { required: true });
|
let password = core.getInput(Inputs.PASSWORD, { required: true });
|
||||||
|
const tlsVerify = core.getInput(Inputs.TLS_VERIFY) || "true";
|
||||||
const logout = core.getInput(Inputs.LOGOUT) || "true";
|
const logout = core.getInput(Inputs.LOGOUT) || "true";
|
||||||
const authFilePath = core.getInput(Inputs.AUTH_FILE_PATH);
|
const authFilePath = core.getInput(Inputs.AUTH_FILE_PATH);
|
||||||
|
|
||||||
|
@ -60,6 +61,9 @@ async function run(): Promise<void> {
|
||||||
if (authFilePath) {
|
if (authFilePath) {
|
||||||
args.push(`--authfile=${authFilePath}`);
|
args.push(`--authfile=${authFilePath}`);
|
||||||
}
|
}
|
||||||
|
if (tlsVerify) {
|
||||||
|
args.push(`--tls-verify=${tlsVerify}`);
|
||||||
|
}
|
||||||
await execute(await getPodmanPath(), args);
|
await execute(await getPodmanPath(), args);
|
||||||
core.info(`✅ Successfully logged in to ${registry} as ${username}`);
|
core.info(`✅ Successfully logged in to ${registry} as ${username}`);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue