mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-02-23 02:21:22 +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
|
## 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>
|
`digest`: The pushed image digest, as written to the `digestfile`.<br>
|
||||||
For example, `sha256:66ce924069ec4181725d15aa27f34afbaf082f434f448dc07a42daa3305cdab3`.
|
For example, `sha256:66ce924069ec4181725d15aa27f34afbaf082f434f448dc07a42daa3305cdab3`.
|
||||||
For multiple tags, the digest is the same.
|
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
|
## 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.
|
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
|
required: false
|
||||||
default: 'true'
|
default: 'true'
|
||||||
digestfile:
|
digestfile:
|
||||||
description: |
|
description: |
|
||||||
After copying the image, write the digest of the resulting image to the file.
|
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.
|
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:
|
extra-args:
|
||||||
description: |
|
description: |
|
||||||
Extra args to be passed to podman push.
|
Extra args to be passed to podman push.
|
||||||
Separate arguments by newline. Do not use quotes - @actions/exec will do the quoting for you.
|
Separate arguments by newline. Do not use quotes - @actions/exec will do the quoting for you.
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
digest:
|
digest:
|
||||||
description: 'The pushed image digest, as written to the "digestfile"'
|
description: 'The pushed image digest, as written to the "digestfile"'
|
||||||
|
registry-path:
|
||||||
|
description: 'The first element of registry-paths.'
|
||||||
registry-paths:
|
registry-paths:
|
||||||
description: 'A JSON array of registry paths to which the tag(s) were pushed'
|
description: 'A JSON array of registry paths to which the tag(s) were pushed'
|
||||||
runs:
|
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.
|
* Default: None.
|
||||||
*/
|
*/
|
||||||
DIGEST = "digest",
|
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
|
* A JSON array of registry paths to which the tag(s) were pushed
|
||||||
* Required: false
|
* 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));
|
core.setOutput(Outputs.REGISTRY_PATHS, JSON.stringify(registryPathList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue