Skip to content

Commit c4f5031

Browse files
committed
Add disk space cleanup to Docker publish workflows
Introduced a step to free up disk space in both AMD64 and ARM64 Docker offline publish workflows by removing unused directories and pruning Docker system. This helps prevent build failures due to insufficient disk space on GitHub Actions runners.
1 parent aafdf77 commit c4f5031

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/publish-docker-offline-amd64.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16+
- name: Free up disk space
17+
run: |
18+
sudo rm -rf /usr/share/dotnet
19+
sudo rm -rf /usr/local/lib/android
20+
sudo rm -rf /opt/ghc
21+
sudo rm -rf /opt/hostedtoolcache/CodeQL
22+
docker system prune -af
23+
1624
- name: Set up Docker Buildx
1725
uses: docker/setup-buildx-action@v3
1826

.github/workflows/publish-docker-offline-arm64.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16+
- name: Free up disk space
17+
run: |
18+
sudo rm -rf /usr/share/dotnet
19+
sudo rm -rf /usr/local/lib/android
20+
sudo rm -rf /opt/ghc
21+
sudo rm -rf /opt/hostedtoolcache/CodeQL
22+
docker system prune -af
23+
1624
- name: Set up QEMU
1725
uses: docker/setup-qemu-action@v3
1826

0 commit comments

Comments
 (0)