Skip to content

Commit 28a5267

Browse files
committed
test: fix runner space issues
1 parent c287bb4 commit 28a5267

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Free Disk Space"
2+
description: "Clean GitHub Runner to free up disk space by removing unused components"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Clean GitHub Runner to free up space
7+
shell: bash
8+
run: |
9+
df -h
10+
# unused android sdk: https://github.com/actions/runner-images/issues/13315#issuecomment-3541347562
11+
sudo rm -rf /usr/local/lib/android
12+
df -h

.github/workflows/ci-base.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,21 @@ jobs:
5959
artifact_name: ${{ steps.set-outputs.outputs.artifact_name }}
6060
docker_manifest_sha_name: ${{ steps.set-outputs.outputs.docker_manifest_sha_name }}
6161
steps:
62-
- name: Clean Github Runner to free up space
63-
run: |
64-
df -h
65-
# unused android sdk: https://github.com/actions/runner-images/issues/13315#issuecomment-3541347562
66-
sudo rm -rf /usr/local/lib/android
67-
df -h
6862
- name: Checkout
6963
uses: actions/checkout@v4
7064
with:
7165
fetch-depth: 0 # required for tag metadata
7266

67+
- name: Free disk space
68+
uses: ./.github/actions/free-disk-space
69+
7370
- name: Setup Go
7471
uses: actions/setup-go@v5
7572
with:
7673
go-version: "~1.24"
7774
cache: ${{ env.caching_enabled }}
7875
check-latest: true
79-
76+
8077
- name: Tidy go.mod files
8178
run: go mod tidy
8279

@@ -215,7 +212,6 @@ jobs:
215212
distributions/${{ inputs.distribution }}/dist
216213
key: ${{ steps.generate_binary_key.outputs.binary_key }}
217214

218-
219215
- name: Force artifact version via git tag
220216
run: |
221217
version=$(./scripts/get-version.sh)
@@ -242,8 +238,7 @@ jobs:
242238
version: "2.11.2"
243239
args: ${{ env.goreleaser_args }}
244240
workdir: distributions/${{ inputs.distribution }}
245-
246-
241+
247242
- name: Skip GoReleaser build (cached)
248243
if: steps.cache-goreleaser.outputs.cache-hit == 'true'
249244
run: echo "✅ GoReleaser build skipped - using cached binaries"

0 commit comments

Comments
 (0)