Skip to content

Commit 1e9e1b1

Browse files
committed
Fix
1 parent 1f409af commit 1e9e1b1

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

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

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,35 @@ jobs:
6868
provenance: false
6969
sbom: false
7070

71-
- name: Clean between builds
71+
- name: Aggressive cleanup after AMD64 build
7272
run: |
73+
echo "Disk space before cleanup:"
74+
df -h /
75+
# Stop all buildx builders and remove them
76+
docker buildx stop || true
77+
docker buildx rm --all-inactive --force || true
78+
# Remove ALL docker data
7379
docker system prune -af --volumes || true
74-
echo "Disk space after AMD64 build:"
80+
# Remove buildx cache
81+
docker buildx prune -af || true
82+
# Clear builder cache
83+
rm -rf ~/.docker/buildx || true
84+
# Remove any temp files
85+
sudo rm -rf /tmp/* || true
86+
sudo rm -rf /var/tmp/* || true
87+
# Clear package manager caches
88+
sudo apt-get clean || true
89+
sudo rm -rf /var/lib/apt/lists/* || true
90+
echo "Disk space after cleanup:"
7591
df -h /
7692
93+
- name: Re-setup Docker Buildx for ARM64
94+
uses: docker/setup-buildx-action@v3
95+
with:
96+
driver-opts: |
97+
image=moby/buildkit:latest
98+
network=host
99+
77100
- name: Build and push ARM64 image
78101
uses: docker/build-push-action@v5
79102
with:
@@ -87,7 +110,7 @@ jobs:
87110
cache-to: type=gha,scope=buildkit-arm64,mode=min
88111
provenance: false
89112
sbom: false
90-
113+
91114
- name: Create and push manifest
92115
run: |
93116
docker buildx imagetools create -t yongwww/yongwww:latest \
@@ -96,7 +119,7 @@ jobs:
96119
docker buildx imagetools create -t yongwww/yongwww:${{ github.sha }} \
97120
yongwww/yongwww:amd64-${{ github.sha }} \
98121
yongwww/yongwww:arm64-${{ github.sha }}
99-
122+
100123
- name: Show disk space after build
101124
if: always()
102125
run: df -h /

0 commit comments

Comments
 (0)