From a711f6e5cb027328ec1d9e7335200841e3e6667d Mon Sep 17 00:00:00 2001 From: Andreas Rocznik Date: Fri, 8 Dec 2023 14:09:33 +0100 Subject: [PATCH] test --- action.yml | 9 ++++----- check.sh | 11 ++++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 3975aa0..7921115 100644 --- a/action.yml +++ b/action.yml @@ -6,11 +6,11 @@ branding: color: blue inputs: - base-image: + image: description: "Base Docker image - follows skopeo format (e.g. docker://rust:slim-buster)" required: true - derived-image: - description: "Derived Docker image - follows skopeo format (e.g. docker://rust:slim-buster)" + tags: + description: "list of tags" required: true outputs: differs: @@ -23,5 +23,4 @@ runs: - id: check shell: bash run: | - RESULT=$(${{ github.action_path }}/check.sh ${{ inputs.base-image }} ${{ inputs.derived-image }}) - echo "exist=$RESULT" >> $GITHUB_OUTPUT + ${{ github.action_path }}/check.sh ${{ inputs.image }} ${{ inputs.tags }} diff --git a/check.sh b/check.sh index b6a32e5..f06c21b 100755 --- a/check.sh +++ b/check.sh @@ -2,6 +2,11 @@ set -e -TAGS=$((skopeo list-tags docker://gitea.phadric.de/andreas/sambaa || echo '{"Tags":[]}' )| jq '["alatest","latest"] - .Tags') -#echo $TAGS | jq '"Tag not found: "+ .[]' -echo $TAGS | jq '.==[]' +TAGS=$((skopeo list-tags $1 || echo '{"Tags":[]}' )| jq '["alatest","latest"] - .Tags') +echo $TAGS | jq '"Tag not found: "+ .[]' +RESULT=$($TAGS | jq '.==[]') +if $RESULT == "true" + then + echo "All images found" +fi +echo exist=$RESULT >> $GITHUB_OUTPUT