snuyanzin commented on code in PR #24277:
URL: https://github.com/apache/flink/pull/24277#discussion_r1481469041


##########
.github/actions/job_init/action.yml:
##########
@@ -44,6 +44,31 @@ runs:
         echo "GHA_PIPELINE_START_TIME=${job_start_time}" >> "${GITHUB_ENV}"
         echo "The job's start time is set to ${job_start_time}."
 
+    - name: "Pre-cleanup Disk Info"
+      shell: bash
+      run: df -h
+
+    - name: "Delete unused binaries"
+      shell: bash
+      run: |
+        # inspired by https://github.com/easimon/maximize-build-space
+        for label_with_path in \
+              "Android SDK:/usr/local/lib/android" \
+              "CodeQL:/opt/hostedtoolcache/CodeQL" \
+              ".NET:/usr/share/dotnet"; do
+          dependency_name="$(echo "${label_with_path}" | cut -d: -f1)"
+          dependency_path="$(echo "${label_with_path}" | cut -d: -f2)"
+        
+          if [ -d "${dependency_path}" ]; then
+            echo "[INFO] Deleting binaries of ${dependency_name} in 
${dependency_path}."
+            sudo rm -rf "${dependency_path}"
+            df -h

Review Comment:
   do we need to call `df -h` each succees loop iteration or just one after the 
loop is finished is enough?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to