feat: add workflow cleanup
This commit is contained in:
parent
28afa4e9c0
commit
6bc4157d65
1 changed files with 10 additions and 0 deletions
|
|
@ -145,3 +145,13 @@ jobs:
|
|||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:platform-semantic-amd64 \
|
||||
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:platform-semantic-arm64
|
||||
|
||||
- name: Delete intermediate platform tags
|
||||
run: |
|
||||
CACHE_ENCODED=$(echo "${{ env.CACHE_IMAGE }}" | sed 's|/|%2F|g')
|
||||
for tag in platform-semantic-amd64 platform-semantic-arm64; do
|
||||
curl -s -X DELETE \
|
||||
-H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
|
||||
"https://${{ env.REGISTRY }}/api/v1/packages/${{ github.repository_owner }}/container/${CACHE_ENCODED}/${tag}" \
|
||||
&& echo "Deleted ${tag}" || echo "Failed to delete ${tag} (ignored)"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue