Skip to content

Commit 119118f

Browse files
committed
Update README
1 parent e352a17 commit 119118f

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

.github/workflows/docker.yaml

+43-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,41 @@ jobs:
1818
name: Pull
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Docker Setup Buildx
22-
uses: docker/setup-buildx-action@v3
21+
- name: Before freeing up disk space
22+
run: |
23+
echo "Before freeing up disk space"
24+
echo "=============================================================================="
25+
df -hT
26+
echo "=============================================================================="
27+
28+
# 增加可用磁盘空间
29+
- name: Maximize build space
30+
uses: easimon/maximize-build-space@master
31+
with:
32+
33+
root-reserve-mb: 2048
34+
swap-size-mb: 128
35+
remove-dotnet: 'true'
36+
remove-haskell: 'true'
37+
remove-android: 'true'
38+
build-mount-path: '/var/lib/docker/'
39+
40+
- name: Restart docker
41+
run: sudo service docker restart
42+
43+
- name: Free up disk space complete
44+
run: |
45+
echo "Free up disk space complete"
46+
echo "=============================================================================="
47+
df -hT
48+
echo "=============================================================================="
2349
2450
- name: Checkout Code
2551
uses: actions/checkout@v4
2652

53+
- name: Docker Setup Buildx
54+
uses: docker/setup-buildx-action@v3
55+
2756
- name: Build and push image Aliyun
2857
run: |
2958
docker login -u $ALIYUN_REGISTRY_USER -p $ALIYUN_REGISTRY_PASSWORD $ALIYUN_REGISTRY
@@ -112,4 +141,15 @@ jobs:
112141
docker tag $image $new_image
113142
echo "docker push $new_image"
114143
docker push $new_image
115-
done < images.txt
144+
echo "开始清理磁盘空间"
145+
echo "=============================================================================="
146+
df -hT
147+
echo "=============================================================================="
148+
docker rmi $image
149+
docker rmi $new_image
150+
echo "磁盘空间清理完毕"
151+
echo "=============================================================================="
152+
df -hT
153+
echo "=============================================================================="
154+
155+
done < images.txt

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Docker Images Pusher
22

33
使用Github Action将国外的Docker镜像转存到阿里云私有仓库,供国内服务器使用,免费易用<br>
4-
支持DockerHub, gcr.io, k8s.io, quay.io, ghcr.io等任意仓库
4+
支持DockerHub, gcr.io, k8s.io, ghcr.io等任意仓库<br>
5+
支持最大50GB左右的大型镜像<br>
56

67
视频教程:https://www.bilibili.com/video/BV1Zn4y19743/
78

0 commit comments

Comments
 (0)