ci: Clean up disk usage before saving container to disk (#34770)
Saving the Docker image to disk is failing on EE `pg` because of lack of disk space. So we clean up all the unused Docker images just before doing this.
This commit is contained in:
parent
9766775d05
commit
fc54a33e4b
4
.github/workflows/build-docker-image.yml
vendored
4
.github/workflows/build-docker-image.yml
vendored
|
|
@ -113,6 +113,10 @@ jobs:
|
||||||
# Saving the docker image to tar file
|
# Saving the docker image to tar file
|
||||||
- name: Save Docker image to tar file
|
- name: Save Docker image to tar file
|
||||||
run: |
|
run: |
|
||||||
|
docker image ls --all --no-trunc --format '{{.Repository}},{{.ID}}' \
|
||||||
|
| grep -v cicontainer \
|
||||||
|
| cut -d, -f2 \
|
||||||
|
| xargs docker rmi
|
||||||
docker save cicontainer -o cicontainer.tar
|
docker save cicontainer -o cicontainer.tar
|
||||||
gzip cicontainer.tar
|
gzip cicontainer.tar
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user