Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This action only runs on `Linux`, as it uses [podman](https://github.com/contain
| registry | Hostname/domain of the container image registry such as `quay.io`, `docker.io`. | **Must be provided**
| username | Username to log in against the container image registry. | **Must be provided**
| password | Password, encrypted password, or access token for `username`. | **Must be provided**
| tls-verify | Verify TLS certificates when contacting the registry. | `true`
| logout | By default, the action logs out of the container image registry at the end of the job (for self-hosted runners). Set this to `false` to disable this behaviour. | `true`
| auth_file_path | Path of the authentication file, this will override the default auth file path in podman | Default set in podman |

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
password:
description: 'Password, encrypted password, or access token for username'
required: true
tls-verify:
description: 'Verify TLS certificates when contacting the registry'
required: false
default: 'true'
auth_file_path:
description: 'Path of the authentication file, this will override the default auth file path in podman'
required: false
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/generated/inputs-outputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export enum Inputs {
* Default: None.
*/
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
* Required: true
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async function run(): Promise<void> {
registry = core.getInput(Inputs.REGISTRY, { required: true });
let username = core.getInput(Inputs.USERNAME, { 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 authFilePath = core.getInput(Inputs.AUTH_FILE_PATH);

Expand All @@ -60,6 +61,9 @@ async function run(): Promise<void> {
if (authFilePath) {
args.push(`--authfile=${authFilePath}`);
}
if (tlsVerify) {
args.push(`--tls-verify=${tlsVerify}`);
}
await execute(await getPodmanPath(), args);
core.info(`✅ Successfully logged in to ${registry} as ${username}`);

Expand Down