From ca098255c542127940a1c857bcf1ef428c26fca2 Mon Sep 17 00:00:00 2001 From: Mikhail Nacharov Date: Wed, 1 Feb 2023 11:28:51 +0400 Subject: [PATCH] feat: output built image reference --- README.md | 6 ++++++ action.yml | 3 +++ entrypoint.sh | 1 + 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 6dff48a..30f8528 100644 --- a/README.md +++ b/README.md @@ -175,3 +175,9 @@ with: ``` for the tag `pre-0.1` will push `kaniko:0.1`, as the `pre-` part will be stripped from the tag name. + +## Outputs + +### `image` + +Full reference to the built image with registry and tag. diff --git a/action.yml b/action.yml index cb313e3..7c51772 100644 --- a/action.yml +++ b/action.yml @@ -57,6 +57,9 @@ inputs: debug: description: Enables trace for entrypoint.sh required: false +outputs: + image: + description: "Full reference to the built image with registry and tag" runs: using: "docker" image: "Dockerfile" diff --git a/entrypoint.sh b/entrypoint.sh index d12889d..5e30e41 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -90,6 +90,7 @@ EOF # https://github.com/GoogleContainerTools/kaniko/issues/1349 /kaniko/executor --reproducible --force $ARGS +echo "image=$IMAGE" >> $GITHUB_OUTPUT if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then export DIGEST=$(cat digest)