Files
docker-check-tag-exists/check.sh
2023-12-08 14:44:09 +01:00

14 lines
299 B
Bash
Executable File

#!/bin/bash
set -e
echo "$1"
echo "$2"
TAGS=$( (skopeo list-tags $1 || echo '{"Tags":[]}' )| jq '["alatest","latest"] - .Tags')
echo $TAGS | jq '"Tag not found: "+ .[]'
RESULT=$(echo $TAGS | jq '.==[]')
if "$RESULT" == "true"
then
echo "All images found"
fi
echo exist=$RESULT >> $GITHUB_OUTPUT