Skip to content

Commit

Permalink
(github-actions) Delete untagged GCR images
Browse files Browse the repository at this point in the history
  • Loading branch information
axel-op committed Mar 2, 2024
1 parent 79aa220 commit 1284d1c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
sudo docker cp $GITHUB_EVENT_PATH test-container:/eventpayload
sudo docker exec test-container /bin/bash -c "cd /test && git init"
sudo docker exec -e GITHUB_WORKSPACE=/test -e GITHUB_EVENT_PATH=/eventpayload -e GITHUB_SHA=$GITHUB_SHA -e GITHUB_REPOSITORY=$GITHUB_REPOSITORY -e INPUT_MINANNOTATIONLEVEL=info -e INPUT_GITHUBTOKEN=${{ secrets.GITHUB_TOKEN }} test-container /bin/bash -c "/dart_package_analyzer"
- name: Push new image
if: steps.check.outputs.should_push == 'true'
env:
Expand All @@ -101,4 +101,10 @@ jobs:
echo $GHCR_TOKEN | sudo docker login $REGISTRY --username=$GHCR_USERNAME --password-stdin
sudo docker push $GHCR_IMAGE_TAG
echo $DOCKER_HUB_TOKEN | sudo docker login --username=$DOCKER_HUB_USERNAME --password-stdin
sudo docker push $DOCKER_HUB_IMAGE_TAG
sudo docker push $DOCKER_HUB_IMAGE_TAG
- uses: actions/delete-package-versions@v4
with:
package-name: ${{ github.repository }}
package-type: container
delete-only-untagged-versions: true

0 comments on commit 1284d1c

Please sign in to comment.