Skip to content

Commit 1f409af

Browse files
committed
fix
1 parent 7350b95 commit 1f409af

File tree

1 file changed

+62
-4
lines changed

1 file changed

+62
-4
lines changed

.github/workflows/release-ci-docker.yml

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,24 @@ jobs:
1717
large-packages: true
1818
docker-images: true
1919
swap-storage: true
20+
21+
- name: Additional cleanup
22+
run: |
23+
echo "Before additional cleanup:"
24+
df -h /
25+
# Remove more unnecessary files
26+
sudo rm -rf /usr/local/lib/android || true
27+
sudo rm -rf /opt/hostedtoolcache || true
28+
sudo rm -rf /usr/share/dotnet || true
29+
sudo rm -rf /opt/ghc || true
30+
sudo rm -rf /usr/local/.ghcup || true
31+
# Clean docker if any exists
32+
docker system prune -af --volumes || true
33+
echo "After additional cleanup:"
34+
df -h /
35+
36+
- name: Show disk space before build
37+
run: df -h /
2038

2139
- uses: actions/checkout@v4
2240

@@ -25,20 +43,60 @@ jobs:
2543

2644
- name: Set up Docker Buildx
2745
uses: docker/setup-buildx-action@v3
46+
with:
47+
driver-opts: |
48+
image=moby/buildkit:latest
49+
network=host
2850
2951
- name: Login to Docker Hub
3052
uses: docker/login-action@v3
3153
with:
3254
username: yongwww
3355
password: ${{ secrets.DOCKERHUB_TOKEN }}
3456

35-
- name: Build and push multi-arch image
57+
- name: Build and push AMD64 image
58+
uses: docker/build-push-action@v5
59+
with:
60+
context: docker
61+
file: docker/Dockerfile.ci_gpu
62+
platforms: linux/amd64
63+
push: true
64+
tags: |
65+
yongwww/yongwww:amd64-${{ github.sha }}
66+
cache-from: type=gha,scope=buildkit-amd64
67+
cache-to: type=gha,scope=buildkit-amd64,mode=min
68+
provenance: false
69+
sbom: false
70+
71+
- name: Clean between builds
72+
run: |
73+
docker system prune -af --volumes || true
74+
echo "Disk space after AMD64 build:"
75+
df -h /
76+
77+
- name: Build and push ARM64 image
3678
uses: docker/build-push-action@v5
3779
with:
3880
context: docker
3981
file: docker/Dockerfile.ci_gpu
40-
platforms: linux/amd64,linux/arm64
82+
platforms: linux/arm64
4183
push: true
4284
tags: |
43-
yongwww/yongwww:latest
44-
yongwww/yongwww:${{ github.sha }}
85+
yongwww/yongwww:arm64-${{ github.sha }}
86+
cache-from: type=gha,scope=buildkit-arm64
87+
cache-to: type=gha,scope=buildkit-arm64,mode=min
88+
provenance: false
89+
sbom: false
90+
91+
- name: Create and push manifest
92+
run: |
93+
docker buildx imagetools create -t yongwww/yongwww:latest \
94+
yongwww/yongwww:amd64-${{ github.sha }} \
95+
yongwww/yongwww:arm64-${{ github.sha }}
96+
docker buildx imagetools create -t yongwww/yongwww:${{ github.sha }} \
97+
yongwww/yongwww:amd64-${{ github.sha }} \
98+
yongwww/yongwww:arm64-${{ github.sha }}
99+
100+
- name: Show disk space after build
101+
if: always()
102+
run: df -h /

0 commit comments

Comments
 (0)