Skip to content

Commit

Permalink
Split the tags retrieval from parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
lnhrdt committed Nov 11, 2024
1 parent c9a0c3a commit 20ff482
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion next-image-tag-number/action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ else
AUTH_HEADER=""
fi

TAGS=$(curl -s $AUTH_HEADER "${IMAGE_REPOSITORY_URL}/tags/list" | jq -r '.tags[]' || echo "")
TAGS_LIST_JSON=$(curl -s $AUTH_HEADER "${IMAGE_REPOSITORY_URL}/tags/list")
TAGS=$(echo "$TAGS_LIST_JSON" | jq -r '.tags[]' || echo "")

if [ -z "$TAGS" ]; then
echo "No existing tags were found. Using initial tag number ${INITIAL_NUMBER}."
Expand Down

0 comments on commit 20ff482

Please sign in to comment.