Skip to content

Commit 6795922

Browse files
committed
remove unused tools to free up disk space on the runner image
1 parent 2941711 commit 6795922

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

.github/workflows/buildtest.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ jobs:
3232
build:
3333
runs-on: ubuntu-22.04
3434
steps:
35+
- name: Free up disk space
36+
run: |
37+
sudo rm -rf /usr/local/.ghcup
38+
sudo rm -rf /usr/local/lib/android
39+
sudo rm -rf /usr/local/lib/node_modules
40+
sudo rm -rf /usr/share/dotnet
41+
sudo rm -rf /usr/share/swift
42+
df -h
43+
3544
- name: Checkout
3645
uses: actions/checkout@v4
3746

@@ -43,7 +52,6 @@ jobs:
4352

4453
- name: Build packages
4554
run: |
46-
df -h
4755
[ "${{ github.event.inputs.package }}" = "client" ] && package="client"
4856
if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then
4957
if [ "${RUNNER_DEBUG}" = "1" ]; then
@@ -58,9 +66,9 @@ jobs:
5866
docker buildx build -o packages --build-arg buildoptions="github ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 .
5967
fi
6068
fi
61-
df -h
6269
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV
6370
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV
6471
- name: Test packages
6572
run: |
66-
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/${{ github.event.inputs.arch }} -f .github/Dockerfile.installtest .
73+
df -h
74+
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/${{ github.event.inputs.arch }} -f .github/Dockerfile.installtest .

.github/workflows/release.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ jobs:
1919
contents: write
2020
runs-on: ubuntu-22.04
2121
steps:
22+
- name: Free up disk space
23+
run: |
24+
sudo rm -rf /usr/local/.ghcup
25+
sudo rm -rf /usr/local/lib/android
26+
sudo rm -rf /usr/local/lib/node_modules
27+
sudo rm -rf /usr/share/dotnet
28+
sudo rm -rf /usr/share/swift
29+
df -h
30+
2231
- name: Checkout
2332
uses: actions/checkout@v4
2433

@@ -30,19 +39,18 @@ jobs:
3039

3140
- name: Build packages
3241
run: |
33-
df -h
3442
baseimage="debian:bookworm-slim"
3543
echo "DEB_DIST=Debian/Bookworm" >> $GITHUB_ENV
3644
if [ "${RUNNER_DEBUG}" = "1" ]; then
3745
docker buildx build -o packages --build-arg buildoptions="cross github debug" --build-arg baseimage=${baseimage} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 .
3846
else
3947
docker buildx build -o packages --build-arg buildoptions="cross github" --build-arg baseimage=${baseimage} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 .
4048
fi
41-
df -h
4249
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV
4350
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV
4451
- name: Test packages
4552
run: |
53+
df -h
4654
baseimage="debian:bookworm-slim"
4755
docker buildx build --build-arg baseimage=${baseimage} --platform linux/arm64 -f .github/Dockerfile.installtest .
4856
- name: Release packages

0 commit comments

Comments
 (0)