looping through tags to be removed
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -50,8 +50,10 @@ jobs:
|
||||
TAGS="$(curl -s -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/tags/list | jq -r ".tags[]")"
|
||||
COUNT=$(echo "$TAGS" | wc -l)
|
||||
REMAIN=$((COUNT - 10))
|
||||
TAGS="$(echo "$TAGS" | head -n $REMAIN)"
|
||||
echo "$TAGS"
|
||||
for TAG in $TAGS; do
|
||||
echo should remove $TAG
|
||||
echo "$TAGS" | head -n $REMAIN > /tmp/old_tags
|
||||
|
||||
- name: Remove tags
|
||||
run: |
|
||||
cat /tmp/old_tags | while read TAG; do
|
||||
echo about to delete $TAG
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user