debug
This commit is contained in:
parent
424b8c1ac2
commit
0e07d08988
1 changed files with 9 additions and 3 deletions
|
|
@ -18,9 +18,15 @@ jobs:
|
|||
TOKEN="${{ secrets.PACKAGE_TOKEN }}"
|
||||
|
||||
# Hent alle tags for imaget via Forgejo API
|
||||
TAGS=$(curl -s -H "Authorization: token ${TOKEN}" \
|
||||
"https://${REGISTRY}/api/v1/packages/${OWNER}/container/${IMAGE}/tags" \
|
||||
| tr ',' '\n' | grep '"name"' | sed 's/.*"name":"\([^"]*\)".*/\1/' | sort -r)
|
||||
echo "=== Kalder API ==="
|
||||
API_URL="https://${REGISTRY}/api/v1/packages/${OWNER}/container/${IMAGE}/tags"
|
||||
echo "URL: ${API_URL}"
|
||||
RAW=$(curl -s -H "Authorization: token ${TOKEN}" "${API_URL}")
|
||||
echo "=== Råt API-svar ==="
|
||||
echo "$RAW"
|
||||
echo "=================="
|
||||
|
||||
TAGS=$(echo "$RAW" | tr ',' '\n' | grep '"name"' | sed 's/.*"name":"\([^"]*\)".*/\1/' | sort -r)
|
||||
|
||||
TOTAL=$(echo "$TAGS" | wc -l)
|
||||
echo "Fundet ${TOTAL} tags totalt, beholder ${MIN_KEEP}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue