From 5bafb4a4ab6382d55ab2049a1dc2bab88e17254f Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Fri, 10 Jan 2025 01:19:40 +0100 Subject: [PATCH] chore: Free disk space before running release actions --- .github/actions/free-disk-space/action.yml | 11 +++++++++++ .github/workflows/main.yml | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 .github/actions/free-disk-space/action.yml diff --git a/.github/actions/free-disk-space/action.yml b/.github/actions/free-disk-space/action.yml new file mode 100644 index 00000000000..7270fc611bb --- /dev/null +++ b/.github/actions/free-disk-space/action.yml @@ -0,0 +1,11 @@ +name: free-disk-space +description: Frees disk space by deleting unused files +runs: + using: composite + steps: + - name: remove-android + shell: bash + run: sudo rm -rf /usr/local/lib/android + - name: remove-dotnet + shell: bash + run: sudo rm -rf /usr/share/dotnet diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30c3f8c96e8..2df2acbbfd2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -216,6 +216,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 + - uses: ./.github/actions/free-disk-space - uses: ./.github/actions/setup-go with: cache-prefix: release-go @@ -485,6 +486,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 + - uses: ./.github/actions/free-disk-space - uses: ./.github/actions/setup-go with: cache-prefix: release-go