mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-04-19 22:26:18 +02:00
Add image-url to the output of the action.
Added Complete URL to the Output of the action. Such that other steps can use the URL for further operations also, Modified README based on the changes. Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
e91c7f612e
commit
9bf729da5c
5 changed files with 13 additions and 2 deletions
|
@ -55,6 +55,12 @@ Push-to-registry is a GitHub Action for pushing an OCI-compatible image to an im
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
## Action Outputs
|
||||||
|
|
||||||
|
This action produces these outputs which can be used for further processing in different Github action:
|
||||||
|
|
||||||
|
**image-url**: Contains complete URL of the image which is pushed using this action. (e.g. `quay.io/username/spring-image:v1`)
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
The example below shows how the `push-to-registry` action can be used to push an image created by the [`buildah-action`](https://github.com/redhat-actions/buildah-action) in an early step.
|
The example below shows how the `push-to-registry` action can be used to push an image created by the [`buildah-action`](https://github.com/redhat-actions/buildah-action) in an early step.
|
||||||
|
|
|
@ -21,6 +21,9 @@ inputs:
|
||||||
password:
|
password:
|
||||||
description: 'Password to use as credential to authenticate to the registry'
|
description: 'Password to use as credential to authenticate to the registry'
|
||||||
required: true
|
required: true
|
||||||
|
outputs:
|
||||||
|
image-url:
|
||||||
|
description: 'Complete URL of the pushed image'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|
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
|
@ -40,6 +40,8 @@ export async function run(): Promise<void> {
|
||||||
return Promise.reject(new Error(push.reason));
|
return Promise.reject(new Error(push.reason));
|
||||||
}
|
}
|
||||||
core.info(`Successfully pushed ${imageToPush} to ${registryUrl}.`);
|
core.info(`Successfully pushed ${imageToPush} to ${registryUrl}.`);
|
||||||
|
|
||||||
|
core.setOutput('image-url', registryUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function execute(executable: string, args: string[]): Promise<CommandResult> {
|
async function execute(executable: string, args: string[]): Promise<CommandResult> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue