chore: delete old docker hassio nightly tags, only keep last 2 (#18852)

This commit is contained in:
Dirk 2025-02-18 16:38:51 +01:00 • committed by GitHub
parent 22db4e1790
commit b1d491226b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,7 @@ jobs:
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
- name: Define tags
id: meta
uses: docker/metadata-action@v5
with:
@ -76,6 +76,14 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
- name: Delete old nightly.* tags
run: |
old_tags=$(curl -s "https://hub.docker.com/v2/repositories/evcc/evcc/tags/?page_size=100" | jq -r '.results | map(select(.name | startswith("nightly."))) | sort_by(.last_updated) | reverse | .[1:] | .[].name')
for tag in $old_tags; do
echo "Deleting tag: $tag"
curl -s -H "Authorization: Bearer ${{ secrets.DOCKER_TOKEN }}" -X DELETE "https://hub.docker.com/v2/repositories/evcc/evcc/tags/$tag/"
done
hassio:
name: Hassio Addon :nightly
needs: