Skip to content

Commit 656e0e8

Browse files
committed
ci: reuse contrib free disk script
1 parent b55169c commit 656e0e8

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

.github/actions/free-disk-space/action.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci-base.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ jobs:
6464
with:
6565
fetch-depth: 0 # required for tag metadata
6666

67-
- name: Free disk space
68-
uses: ./.github/actions/free-disk-space
67+
- run: ./scripts/free-disk-space.sh
6968

7069
- name: Setup Go
7170
uses: actions/setup-go@v5

scripts/free-disk-space.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
echo "Available disk space before:"
7+
df -h /
8+
9+
# The Android SDK is the biggest culprit for the lack of disk space in CI.
10+
# It is installed into /usr/local/lib/android manually (ie. not with apt) by this script:
11+
# https://github.com/actions/runner-images/blob/main/images/ubuntu/scripts/build/install-android-sdk.sh
12+
# so let's delete the directory manually.
13+
echo "Deleting unused Android SDK and tools..."
14+
sudo rm -rf /usr/local/lib/android
15+
16+
echo "Available disk space after:"
17+
df -h /

0 commit comments

Comments
 (0)