check if tags exist

This commit is contained in:
2023-12-08 13:51:08 +01:00
parent d8cf79d3bc
commit 2707de296c
2 changed files with 4 additions and 5 deletions

View File

@@ -24,4 +24,4 @@ runs:
shell: bash
run: |
RESULT=$(${{ github.action_path }}/check.sh ${{ inputs.base-image }} ${{ inputs.derived-image }})
echo "differs=$RESULT" >> $GITHUB_OUTPUT
echo "exist=$RESULT" >> $GITHUB_OUTPUT

View File

@@ -2,7 +2,6 @@
set -e
BASE_LAYERS="$(skopeo inspect $1 | jq '.Layers')"
DERIVED_LAYERS="$(skopeo inspect $2 | jq '.Layers')"
jq '.base - .derived | .!=[]' <<< "{\"base\": $BASE_LAYERS, \"derived\": $DERIVED_LAYERS}"
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 '.==[]'