mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-04-19 22:26:18 +02: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:
parent
e7b5c08b38
commit
38bde145f1
4 changed files with 18 additions and 2 deletions
10
README.md
10
README.md
|
@ -68,7 +68,15 @@ Refer to the [`podman push`](http://docs.podman.io/en/latest/markdown/podman-man
|
||||||
<td>digestfile</td>
|
<td>digestfile</td>
|
||||||
<td>No</td>
|
<td>No</td>
|
||||||
<td>After copying the image, write the digest of the resulting image to the file. By default, the filename will be determined from the image and tag.
|
<td>After copying the image, write the digest of the resulting image to the file. By default, the filename will be determined from the image and tag.
|
||||||
The contents of this file are the <code>digest</code> output.
|
The contents of this file are the <code>digest</code> output.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>extra-args</td>
|
||||||
|
<td>No</td>
|
||||||
|
<td>Extra args to be passed to push command when pushing image.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
## Action Outputs
|
## Action Outputs
|
||||||
|
|
|
@ -31,6 +31,9 @@ inputs:
|
||||||
By default, the filename will be determined from the image and tag.
|
By default, the filename will be determined from the image and tag.
|
||||||
The contents of this file are the digest output.
|
The contents of this file are the digest output.
|
||||||
required: false
|
required: false
|
||||||
|
extra-args:
|
||||||
|
description: 'Extra args to be passed to push command when pushing image'
|
||||||
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
digest:
|
digest:
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -43,6 +43,7 @@ async function run(): Promise<void> {
|
||||||
const password = core.getInput("password", { required: true });
|
const password = core.getInput("password", { required: true });
|
||||||
const tlsVerify = core.getInput("tls-verify");
|
const tlsVerify = core.getInput("tls-verify");
|
||||||
const digestFileInput = core.getInput("digestfile");
|
const digestFileInput = core.getInput("digestfile");
|
||||||
|
const extraArgs = core.getInput("extra-args");
|
||||||
|
|
||||||
imageToPush = `${imageInput}`;
|
imageToPush = `${imageInput}`;
|
||||||
const registryPathList: string[] = [];
|
const registryPathList: string[] = [];
|
||||||
|
@ -159,6 +160,10 @@ async function run(): Promise<void> {
|
||||||
registryPath,
|
registryPath,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (extraArgs) {
|
||||||
|
args.push(extraArgs);
|
||||||
|
}
|
||||||
|
|
||||||
// check if tls-verify is not set to null
|
// check if tls-verify is not set to null
|
||||||
if (tlsVerify) {
|
if (tlsVerify) {
|
||||||
args.push(`--tls-verify=${tlsVerify}`);
|
args.push(`--tls-verify=${tlsVerify}`);
|
||||||
|
|
Loading…
Add table
Reference in a new issue