diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml
index 9479a96956..96f3b1a7bb 100644
--- a/.github/workflows/docker.yaml
+++ b/.github/workflows/docker.yaml
@@ -18,12 +18,41 @@ jobs:
name: Pull
runs-on: ubuntu-latest
steps:
- - name: Docker Setup Buildx
- uses: docker/setup-buildx-action@v3
+ - name: Before freeing up disk space
+ run: |
+ echo "Before freeing up disk space"
+ echo "=============================================================================="
+ df -hT
+ echo "=============================================================================="
+
+ # 增加可用磁盘空间
+ - name: Maximize build space
+ uses: easimon/maximize-build-space@master
+ with:
+
+ root-reserve-mb: 2048
+ swap-size-mb: 128
+ remove-dotnet: 'true'
+ remove-haskell: 'true'
+ remove-android: 'true'
+ build-mount-path: '/var/lib/docker/'
+
+ - name: Restart docker
+ run: sudo service docker restart
+
+ - name: Free up disk space complete
+ run: |
+ echo "Free up disk space complete"
+ echo "=============================================================================="
+ df -hT
+ echo "=============================================================================="
- name: Checkout Code
uses: actions/checkout@v4
+ - name: Docker Setup Buildx
+ uses: docker/setup-buildx-action@v3
+
- name: Build and push image Aliyun
run: |
docker login -u $ALIYUN_REGISTRY_USER -p $ALIYUN_REGISTRY_PASSWORD $ALIYUN_REGISTRY
@@ -112,4 +141,15 @@ jobs:
docker tag $image $new_image
echo "docker push $new_image"
docker push $new_image
- done < images.txt
+ echo "开始清理磁盘空间"
+ echo "=============================================================================="
+ df -hT
+ echo "=============================================================================="
+ docker rmi $image
+ docker rmi $new_image
+ echo "磁盘空间清理完毕"
+ echo "=============================================================================="
+ df -hT
+ echo "=============================================================================="
+
+ done < images.txt
\ No newline at end of file
diff --git a/README.md b/README.md
index 1bcd1284d8..5d4cf2bdd2 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
# Docker Images Pusher
使用Github Action将国外的Docker镜像转存到阿里云私有仓库,供国内服务器使用,免费易用
-支持DockerHub, gcr.io, k8s.io, quay.io, ghcr.io等任意仓库
+支持DockerHub, gcr.io, k8s.io, ghcr.io等任意仓库
+支持最大50GB左右的大型镜像
视频教程:https://www.bilibili.com/video/BV1Zn4y19743/