mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-04-20 23:31:22 +00:00
Resolve reviews
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
e4fe453aaf
commit
14ed9e2bbd
6 changed files with 13 additions and 11 deletions
|
@ -22,9 +22,9 @@ Refer to the [`podman push`](http://docs.podman.io/en/latest/markdown/podman-man
|
|||
|
||||
| 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`
|
||||
| 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
|
||||
| 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`
|
||||
|
|
|
@ -13,7 +13,7 @@ inputs:
|
|||
required: false
|
||||
default: 'latest'
|
||||
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
|
||||
username:
|
||||
description: 'Username to use as credential to authenticate to the registry'
|
||||
|
|
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
|
@ -28,7 +28,7 @@ export enum Inputs {
|
|||
*/
|
||||
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
|
||||
* Default: None.
|
||||
*/
|
||||
|
|
12
src/index.ts
12
src/index.ts
|
@ -182,7 +182,9 @@ async function run(): Promise<void> {
|
|||
+ `to form registry path "${registryPath}"`);
|
||||
|
||||
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
|
||||
|
@ -393,11 +395,11 @@ async function execute(
|
|||
}
|
||||
|
||||
run()
|
||||
.catch((err) => {
|
||||
core.setFailed(err.message);
|
||||
})
|
||||
.finally(async () => {
|
||||
.then(async () => {
|
||||
if (isImageFromDocker) {
|
||||
await removeDockerImage();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
core.setFailed(err.message);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue