Skip to content

Commit

Permalink
Add option for selecting the apt mirror country
Browse files Browse the repository at this point in the history
Since the GitHub cloud runners are located in the US, 'US' is selected to be the default.

Source: https://github.com/orgs/community/discussions/24969
  • Loading branch information
rake5k committed Dec 1, 2023
1 parent 31d7916 commit 211393a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ inputs:
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"
Expand Down Expand Up @@ -180,7 +184,7 @@ runs:
if [[ ${{ inputs.allow-apt-mirrors }} == 'true' ]]; then
# Select alternative apt mirror
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-spy2 fix --commit --launchpad --country=${{ inputs.apt-mirror-country }}
sudo apt-get update
fi
Expand Down

0 comments on commit 211393a

Please sign in to comment.