Skip to content

Commit ea4e1c5

Browse files
Reuse and improve free space action (#10226)
* Reuse and improve free space action Signed-off-by: Artem Savchenko <[email protected]> * Checkout actions Signed-off-by: Artem Savchenko <[email protected]> --------- Signed-off-by: Artem Savchenko <[email protected]>
1 parent f75296e commit ea4e1c5

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ runs:
1313
sudo rm -rf /usr/share/az_*
1414
sudo rm -rf /opt/az
1515
sudo rm -rf /usr/lib/google-cloud-sdk
16+
sudo rm -rf /opt/ghc
17+
sudo rm -rf "/usr/local/share/boost"
18+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
1619
echo "Disk space after cleanup:"
1720
df -h

.github/workflows/main.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -612,16 +612,13 @@ jobs:
612612
timeout-minutes: 60
613613
steps:
614614
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
615-
- name: Free disk space
616-
run: |
617-
echo "Disk space before cleanup:"
618-
df -h
619-
sudo rm -rf /usr/share/dotnet
620-
sudo rm -rf /opt/ghc
621-
sudo rm -rf "/usr/local/share/boost"
622-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
623-
echo "Disk space after cleanup:"
624-
df -h
615+
- uses: actions/checkout@v4
616+
with:
617+
fetch-depth: 0
618+
filter: tree:0
619+
submodules: recursive
620+
- name: Free space
621+
uses: ./.github/actions/free-disk-space
625622
- name: Set up QEMU
626623
uses: docker/setup-qemu-action@v3
627624
- name: Configure docker
@@ -633,11 +630,6 @@ jobs:
633630
"containerd-snapshotter": true
634631
}
635632
}
636-
- uses: actions/checkout@v4
637-
with:
638-
fetch-depth: 0
639-
filter: tree:0
640-
submodules: recursive
641633
642634
- name: Checkout init repository
643635
run: |

0 commit comments

Comments
 (0)