Skip to content

Commit 4e16751

Browse files
authored
adding logic to GHA's to remove unused diskspace (#6920)
Signed-off-by: Adam D. Cornett <[email protected]>
1 parent 4735e0a commit 4e16751

6 files changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo "Removing unused system files to gain more disk space"
6+
rm -fr /opt/hostedtoolcache
7+
cd /opt
8+
find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';'

.github/workflows/integration.yml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
- uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32+
33+
- name: Cleanup Unused Disk Space
34+
run: |
35+
.github/workflows/clean-unused-disk-space.sh
36+
3237
- uses: actions/setup-go@v5
3338
with:
3439
go-version-file: "go.mod"

.github/workflows/test-go.yml

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
- uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0
35+
36+
- name: Cleanup Unused Disk Space
37+
run: |
38+
.github/workflows/clean-unused-disk-space.sh
39+
3540
- uses: actions/setup-go@v5
3641
with:
3742
go-version-file: "go.mod"
@@ -47,6 +52,11 @@ jobs:
4752
- uses: actions/checkout@v4
4853
with:
4954
fetch-depth: 0
55+
56+
- name: Cleanup Unused Disk Space
57+
run: |
58+
.github/workflows/clean-unused-disk-space.sh
59+
5060
- uses: actions/setup-go@v5
5161
with:
5262
go-version-file: "go.mod"

.github/workflows/test-helm.yml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
- uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32+
33+
- name: Cleanup Unused Disk Space
34+
run: |
35+
.github/workflows/clean-unused-disk-space.sh
36+
3237
- uses: actions/setup-go@v5
3338
with:
3439
go-version-file: "go.mod"

.github/workflows/test-sample-go.yml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
- uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32+
33+
- name: Cleanup Unused Disk Space
34+
run: |
35+
.github/workflows/clean-unused-disk-space.sh
36+
3237
- uses: actions/setup-go@v5
3338
with:
3439
go-version-file: "go.mod"

.github/workflows/test-sanity.yml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
- uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32+
33+
- name: Cleanup Unused Disk Space
34+
run: |
35+
.github/workflows/clean-unused-disk-space.sh
36+
3237
- uses: actions/setup-go@v5
3338
with:
3439
go-version-file: "go.mod"

0 commit comments

Comments
 (0)