diff --git a/action.yml b/action.yml index bb3dcb9..84559a0 100644 --- a/action.yml +++ b/action.yml @@ -44,6 +44,15 @@ inputs: required: false default: "true" + allow-apt-mirrors: + description: "Allow use of alternative apt mirrors" + required: false + default: "false" + apt-mirror-country: + description: "Location of the apt mirror to use (if using GitHub cloud runners, select 'US')" + required: false + default: "US" + runs: using: "composite" steps: @@ -171,6 +180,13 @@ runs: if [[ ${{ inputs.large-packages }} == 'true' ]]; then BEFORE=$(getAvailableSpace) + + if [[ ${{ inputs.allow-apt-mirrors }} == 'true' ]]; then + # Select alternative apt mirror + sudo gem install apt-spy2 + sudo apt-spy2 fix --commit --launchpad --country=${{ inputs.apt-mirror-country }} + sudo apt-get update + fi sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..." 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..."