2
0
Fork 0
mirror of https://github.com/redhat-actions/push-to-registry.git synced 2025-09-15 17:26:56 +00:00

Add feature to pass extra args when pushing image

If a user wants to pass few extra args to push
command when pushing image, then he can pass
using 'extra-args' input parameter.

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2021-01-28 15:45:07 +05:30
parent e7b5c08b38
commit 38bde145f1
4 changed files with 18 additions and 2 deletions

View file

@ -43,6 +43,7 @@ async function run(): Promise<void> {
const password = core.getInput("password", { required: true });
const tlsVerify = core.getInput("tls-verify");
const digestFileInput = core.getInput("digestfile");
const extraArgs = core.getInput("extra-args");
imageToPush = `${imageInput}`;
const registryPathList: string[] = [];
@ -159,6 +160,10 @@ async function run(): Promise<void> {
registryPath,
];
if (extraArgs) {
args.push(extraArgs);
}
// check if tls-verify is not set to null
if (tlsVerify) {
args.push(`--tls-verify=${tlsVerify}`);