From 76f654ad2bf89b75201280e3f2652e08ee27abdd Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Sun, 11 Aug 2024 18:28:09 +0200 Subject: [PATCH] Cleanup Docker images before pushing --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72191b0..c322ee2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,6 +124,15 @@ jobs: PGTARGET: ${{ matrix.pg_target }} OS_FLAVOR: ${{ matrix.operating_system.flavor }} + # otherwise, we run into space problems + # from observation, the buildx builder container already occupies 7 GB out of the 14 GB we have available on a GitHub Actions runner + # note that this command will also destroy the pgautoupgrade image we just build + # which is intentional, the buildx builder should contain all information still to re-create the same image + - name: Cleanup Docker image before pushing + if: github.repository == 'pgautoupgrade/docker-pgautoupgrade' && github.ref == 'refs/heads/main' + run: | + docker image prune -a + - name: Push image if: github.repository == 'pgautoupgrade/docker-pgautoupgrade' && github.ref == 'refs/heads/main' uses: docker/build-push-action@v5