This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 59bc37f37fd add disk space cleanup script (#45322)
59bc37f37fd is described below
commit 59bc37f37fdb8d1319b12a97ad01fdefb77b61a9
Author: GPK <[email protected]>
AuthorDate: Wed Jan 1 10:20:59 2025 +0000
add disk space cleanup script (#45322)
---
.github/workflows/finalize-tests.yml | 3 +++
scripts/tools/free_up_disk_space.sh | 39 ++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/.github/workflows/finalize-tests.yml
b/.github/workflows/finalize-tests.yml
index 17f467162ce..ff06e8cadf2 100644
--- a/.github/workflows/finalize-tests.yml
+++ b/.github/workflows/finalize-tests.yml
@@ -181,6 +181,9 @@ jobs:
- name: "Cleanup repo"
shell: bash
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm
-rf /workspace/*"
+ - name: Free up disk space
+ shell: bash
+ run: ./scripts/tools/free_up_disk_space.sh
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
diff --git a/scripts/tools/free_up_disk_space.sh
b/scripts/tools/free_up_disk_space.sh
new file mode 100755
index 00000000000..f959f65e9e1
--- /dev/null
+++ b/scripts/tools/free_up_disk_space.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+COLOR_BLUE=$'\e[34m'
+COLOR_RESET=$'\e[0m'
+
+echo "${COLOR_BLUE}Disk space before cleanup${COLOR_RESET}"
+df -h
+
+echo "${COLOR_BLUE}Freeing up disk space${COLOR_RESET}"
+sudo rm -rf /usr/share/dotnet/
+sudo rm -rf /usr/local/graalvm/
+sudo rm -rf /usr/local/.ghcup/
+sudo rm -rf /usr/local/share/powershell
+sudo rm -rf /usr/local/share/chromium
+sudo rm -rf /usr/local/share/boost
+sudo rm -rf /usr/local/lib/android
+sudo rm -rf /opt/hostedtoolcache/CodeQL
+sudo rm -rf /opt/hostedtoolcache/Ruby
+sudo rm -rf /opt/hostedtoolcache/go
+sudo rm -rf /opt/ghc
+sudo apt-get clean
+echo "${COLOR_BLUE}Disk space after cleanup${COLOR_RESET}"
+df -h