Skip to content

Commit 3050e97

Browse files
committed
ci: replace inline cleanup commands with reusable action
Update workflows to use the new `cleanup-space` composite action for clearing runner disk space, replacing the manual `rm -rf` commands. Add a cleanup step to the cross-compilation job.
1 parent 8dcacfd commit 3050e97

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/main.yaml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ jobs:
175175
runs-on: ubuntu-latest
176176
steps:
177177
- name: git checkout
178-
uses: actions/checkout@v4
178+
uses: actions/checkout@v5
179+
180+
- name: Clean up runner space
181+
uses: ./.github/actions/cleanup-space
179182

180183
- name: Setup go ${{ env.GO_VERSION }}
181184
uses: actions/setup-go@v5
@@ -280,11 +283,11 @@ jobs:
280283
name: run itests
281284
runs-on: ubuntu-latest
282285
steps:
283-
- name: cleanup space
284-
run: rm -rf /opt/hostedtoolcache
285-
286286
- name: git checkout
287-
uses: actions/checkout@v4
287+
uses: actions/checkout@v5
288+
289+
- name: Clean up runner space
290+
uses: ./.github/actions/cleanup-space
288291

289292
- name: Setup go ${{ env.GO_VERSION }}
290293
uses: actions/setup-go@v5
@@ -323,11 +326,11 @@ jobs:
323326
name: run itests postgres
324327
runs-on: ubuntu-latest
325328
steps:
326-
- name: cleanup space
327-
run: rm -rf /opt/hostedtoolcache
328-
329329
- name: git checkout
330-
uses: actions/checkout@v4
330+
uses: actions/checkout@v5
331+
332+
- name: Clean up runner space
333+
uses: ./.github/actions/cleanup-space
331334

332335
- name: Setup go ${{ env.GO_VERSION }}
333336
uses: actions/setup-go@v5
@@ -367,11 +370,11 @@ jobs:
367370
runs-on: ubuntu-latest
368371

369372
steps:
370-
- name: cleanup space
371-
run: rm -rf /opt/hostedtoolcache
372-
373373
- name: git checkout
374-
uses: actions/checkout@v4
374+
uses: actions/checkout@v5
375+
376+
- name: Clean up runner space
377+
uses: ./.github/actions/cleanup-space
375378

376379
- name: Setup go ${{ env.GO_VERSION }}
377380
uses: actions/setup-go@v5

0 commit comments

Comments
 (0)