mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-02-22 18:21:20 +01:00
Add back singular registry-path output
Fixes #29 Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
parent
902794f5ab
commit
24d8460d9f
6 changed files with 19 additions and 8 deletions
|
@ -86,13 +86,15 @@ Refer to the [`podman push`](http://docs.podman.io/en/latest/markdown/podman-man
|
|||
|
||||
## Action Outputs
|
||||
|
||||
`registry-paths`: A JSON array of registry paths to which the tag(s) were pushed.<br>
|
||||
For example, `[ quay.io/username/spring-image:v1, quay.io/username/spring-image:latest ]`.
|
||||
|
||||
`digest`: The pushed image digest, as written to the `digestfile`.<br>
|
||||
For example, `sha256:66ce924069ec4181725d15aa27f34afbaf082f434f448dc07a42daa3305cdab3`.
|
||||
For multiple tags, the digest is the same.
|
||||
|
||||
`registry-paths`: A JSON array of registry paths to which the tag(s) were pushed.<br>
|
||||
For example, `[ quay.io/username/spring-image:v1, quay.io/username/spring-image:latest ]`.
|
||||
|
||||
`registry-path`: The first element of `registry-paths`, as a string.
|
||||
|
||||
## Examples
|
||||
|
||||
The example below shows how the `push-to-registry` action can be used to push an image created by the [buildah-build](https://github.com/redhat-actions/buildah-build) action.
|
||||
|
|
|
@ -26,20 +26,22 @@ inputs:
|
|||
required: false
|
||||
default: 'true'
|
||||
digestfile:
|
||||
description: |
|
||||
description: |
|
||||
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 digest output.
|
||||
required: false
|
||||
extra-args:
|
||||
description: |
|
||||
description: |
|
||||
Extra args to be passed to podman push.
|
||||
Separate arguments by newline. Do not use quotes - @actions/exec will do the quoting for you.
|
||||
required: false
|
||||
|
||||
|
||||
outputs:
|
||||
digest:
|
||||
description: 'The pushed image digest, as written to the "digestfile"'
|
||||
registry-path:
|
||||
description: 'The first element of registry-paths.'
|
||||
registry-paths:
|
||||
description: 'A JSON array of registry paths to which the tag(s) were pushed'
|
||||
runs:
|
||||
|
|
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
|
@ -60,6 +60,12 @@ export enum Outputs {
|
|||
* Default: None.
|
||||
*/
|
||||
DIGEST = "digest",
|
||||
/**
|
||||
* The first element of registry-paths.
|
||||
* Required: false
|
||||
* Default: None.
|
||||
*/
|
||||
REGISTRY_PATH = "registry-path",
|
||||
/**
|
||||
* A JSON array of registry paths to which the tag(s) were pushed
|
||||
* Required: false
|
||||
|
|
|
@ -197,6 +197,7 @@ async function run(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
core.setOutput(Outputs.REGISTRY_PATH, registryPathList[0]);
|
||||
core.setOutput(Outputs.REGISTRY_PATHS, JSON.stringify(registryPathList));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue