Skip to content

Commit

Permalink
delete old image
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Jan 5, 2025
1 parent 3c6e498 commit c893054
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ jobs:
- name: Push Docker image
run: docker push ghcr.io/softcatala/whisper-ctranslate2:latest

- name: Delete old images
run: |
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
gh api -X GET /user/packages/container/whisper-ctranslate2/versions \
| jq -r '.[] | select(.metadata.container.tags | index("latest") | not) | .id' \
| xargs -I {} gh api -X DELETE /user/packages/container/whisper-ctranslate2/versions/{}

0 comments on commit c893054

Please sign in to comment.