From 54e3bbe6fb7a75d36d3780df08756a195b9bb655 Mon Sep 17 00:00:00 2001 From: Kfir Kaplan Date: Thu, 15 Jun 2023 13:09:24 +0300 Subject: [PATCH 1/3] Allow fails in Remove large packages --- action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index fb141db..ad7d687 100644 --- a/action.yml +++ b/action.yml @@ -166,14 +166,14 @@ runs: if [[ ${{ inputs.large-packages }} == 'true' ]]; then BEFORE=$(getAvailableSpace) - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y '^mongodb-.*' - sudo apt-get remove -y '^mysql-.*' - sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - sudo apt-get autoremove -y - sudo apt-get clean + sudo apt-get remove -y '^dotnet-.*' || true + sudo apt-get remove -y '^llvm-.*' || true + sudo apt-get remove -y 'php.*' || true + sudo apt-get remove -y '^mongodb-.*' || true + sudo apt-get remove -y '^mysql-.*' || true + sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri || true + sudo apt-get autoremove -y || true + sudo apt-get clean || true AFTER=$(getAvailableSpace) SAVED=$((AFTER-BEFORE)) From 0f2cc361875b00eaca290d19f2176e58c664fb02 Mon Sep 17 00:00:00 2001 From: Kfir Kaplan Date: Thu, 15 Jun 2023 14:22:34 +0300 Subject: [PATCH 2/3] added --fix-missing --- action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index ad7d687..2a0cd3d 100644 --- a/action.yml +++ b/action.yml @@ -166,12 +166,12 @@ runs: if [[ ${{ inputs.large-packages }} == 'true' ]]; then BEFORE=$(getAvailableSpace) - sudo apt-get remove -y '^dotnet-.*' || true - sudo apt-get remove -y '^llvm-.*' || true - sudo apt-get remove -y 'php.*' || true - sudo apt-get remove -y '^mongodb-.*' || true - sudo apt-get remove -y '^mysql-.*' || true - sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri || true + sudo apt-get remove -y '^dotnet-.*' --fix-missing || true + sudo apt-get remove -y '^llvm-.*' --fix-missing || true + sudo apt-get remove -y 'php.*' --fix-missing || true + sudo apt-get remove -y '^mongodb-.*' --fix-missing || true + sudo apt-get remove -y '^mysql-.*' --fix-missing || true + sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || true sudo apt-get autoremove -y || true sudo apt-get clean || true From 18a6b389e261b949727062a1b8efd32a532a7991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Lumbroso?= Date: Thu, 28 Sep 2023 23:44:08 -0400 Subject: [PATCH 3/3] Update action.yml with logs of failures Co-authored-by: Chris Carini <6374067+ChrisCarini@users.noreply.github.com> --- action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 2a0cd3d..d4a0567 100644 --- a/action.yml +++ b/action.yml @@ -166,14 +166,14 @@ runs: if [[ ${{ inputs.large-packages }} == 'true' ]]; then BEFORE=$(getAvailableSpace) - sudo apt-get remove -y '^dotnet-.*' --fix-missing || true - sudo apt-get remove -y '^llvm-.*' --fix-missing || true - sudo apt-get remove -y 'php.*' --fix-missing || true - sudo apt-get remove -y '^mongodb-.*' --fix-missing || true - sudo apt-get remove -y '^mysql-.*' --fix-missing || true - sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || true - sudo apt-get autoremove -y || true - sudo apt-get clean || true + sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..." + sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..." + sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..." + sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..." + sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..." + sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..." + sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..." + sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..." AFTER=$(getAvailableSpace) SAVED=$((AFTER-BEFORE))