Resolve reviews

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2021-04-22 20:50:21 +05:30
parent e4fe453aaf
commit 14ed9e2bbd
6 changed files with 13 additions and 11 deletions

View file

@ -22,9 +22,9 @@ Refer to the [`podman push`](http://docs.podman.io/en/latest/markdown/podman-man
| Input Name | Description | Default | | Input Name | Description | Default |
| ---------- | ----------- | ------- | | ---------- | ----------- | ------- |
| image | Name of the image you want to push. Eg. `username/imagename` or `imagename` | **Required** | image | Name of the image you want to push. Eg. `username/imagename` or `imagename`. See the note below about naming image and registry. | **Required**
| tags | The tag or tags of the image to push. For multiple tags, separate by a space. For example, `latest ${{ github.sha }}`. | `latest` | tags | The tag or tags of the image to push. For multiple tags, separate by a space. For example, `latest ${{ github.sha }}`. | `latest`
| registry | URL of the registry to push the image to. Eg. `quay.io` or `quay.io/username` | **Required** | registry | Hostname and optional namespace to push the image to. Eg. `quay.io` or `quay.io/username`. See the note below about naming image and registry. | **Required**
| username | Username with which to authenticate to the registry. Required unless already logged in to the registry. | None | username | Username with which to authenticate to the registry. Required unless already logged in to the registry. | None
| password | Password, encrypted password, or access token to use to log in to the registry. Required unless already logged in to the registry. | None | password | Password, encrypted password, or access token to use to log in to the registry. Required unless already logged in to the registry. | None
| tls-verify | Verify TLS certificates when contacting the registry. Set to `false` to skip certificate verification. | `true` | tls-verify | Verify TLS certificates when contacting the registry. Set to `false` to skip certificate verification. | `true`

View file

@ -13,7 +13,7 @@ inputs:
required: false required: false
default: 'latest' default: 'latest'
registry: registry:
description: 'Registry URL to push the image to (eg. quay.io/username or quay.io)' description: 'Hostname and optional namespace to push the image to (eg. quay.io/username or quay.io)'
required: true required: true
username: username:
description: 'Username to use as credential to authenticate to the registry' description: 'Username to use as credential to authenticate to the registry'

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -28,7 +28,7 @@ export enum Inputs {
*/ */
PASSWORD = "password", PASSWORD = "password",
/** /**
* Registry URL to push the image to (eg. quay.io/username or quay.io) * Hostname and optional namespace to push the image to (eg. quay.io/username or quay.io)
* Required: true * Required: true
* Default: None. * Default: None.
*/ */

View file

@ -182,7 +182,9 @@ async function run(): Promise<void> {
+ `to form registry path "${registryPath}"`); + `to form registry path "${registryPath}"`);
if (imageInput.indexOf("/") > -1 && registry.indexOf("/") > -1) { if (imageInput.indexOf("/") > -1 && registry.indexOf("/") > -1) {
core.warning(`Registry path "${registryPath}" doesn't seems to be a valid registry path.`); core.warning(`"${registryPath}" does not seem to be a valid registry path. `
+ `The registry path should not contain more than 2 slashes. `
+ `Refer to the Inputs section of the readme for naming image and registry.`);
} }
// push the image // push the image
@ -393,11 +395,11 @@ async function execute(
} }
run() run()
.catch((err) => { .then(async () => {
core.setFailed(err.message);
})
.finally(async () => {
if (isImageFromDocker) { if (isImageFromDocker) {
await removeDockerImage(); await removeDockerImage();
} }
})
.catch((err) => {
core.setFailed(err.message);
}); });