16 lines
415 B
Bash
Executable File
16 lines
415 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
CHECK=$( echo -n "$2" | sed -e "s#$1:##g" | jq -R -s 'split("\n")' )
|
|
EXISTING=$( skopeo list-tags docker://$1 || echo '{"Tags":[]}' )
|
|
TAGS=$( jq '.check - .existing.Tags' <<< "{\"check\": $CHECK, \"existing\": $EXISTING}" )
|
|
|
|
echo $TAGS | jq '"Tag not found: "+ .[]'
|
|
RESULT=$(echo $TAGS | jq '.==[]')
|
|
if "$RESULT" == "true"
|
|
then
|
|
echo "All tags found"
|
|
fi
|
|
echo exist=$RESULT >> $GITHUB_OUTPUT
|