chore: delete old docker hassio nightly tags, only keep last 2 (#18852)
This commit is contained in:
parent
22db4e1790
commit
b1d491226b
1 changed files with 9 additions and 1 deletions
10
.github/workflows/nightly.yml
vendored
10
.github/workflows/nightly.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue