diff --git a/.github/build.sh b/.github/build.sh index 0602459de1a..83d3a0fd84f 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -1,3 +1,6 @@ #!/bin/bash -sudo -E make PACKAGES="$1" build \ No newline at end of file +sudo -E make PACKAGES="$1" build + +docker images --filter="reference=$REPO_CACHE" --format='{{.Repository}}:{{.Tag}}' | xargs -r docker rmi --force +docker image prune --force \ No newline at end of file diff --git a/.github/plugins/cleanup-images b/.github/plugins/cleanup-images index cd6e3301c0e..bb3da0dac01 100755 --- a/.github/plugins/cleanup-images +++ b/.github/plugins/cleanup-images @@ -3,7 +3,7 @@ exec 3>&1 1>>/tmp/cleanup-images.log 2>&1 event="$1" payload="$2" -if [ "$event" == "package.post.build" ]; then +if [ "$event" == "image.post.push" ]; then out=$(docker images --filter="reference=$REPO_CACHE" --format='{{.Repository}}:{{.Tag}}' | xargs -r docker rmi --force) out1=$(docker image prune --force) jq --arg key0 'state' \