Skip to content

Commit

Permalink
Cleanup Docker images before pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
andyundso committed Aug 11, 2024
1 parent 594a36c commit 76f654a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76f654a

Please sign in to comment.