Skip to content

Commit

Permalink
Download mirrors for specific country
Browse files Browse the repository at this point in the history
  • Loading branch information
FirelightFlagboy committed Jun 17, 2024
1 parent 6a57739 commit 13a07cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .cspell/custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ androidx
anext
anyio
appendleft
appimage
aqtbot
archivings
archs
Expand All @@ -25,7 +26,6 @@ arrowleft
arrowright
arrowup
arwx
appimage
asar
Asas
asend
Expand Down Expand Up @@ -189,7 +189,6 @@ fsyncdir
fusepy
fusermount
fuzzer
hexstring
gdce
generichash
genindex
Expand All @@ -215,6 +214,7 @@ hatin'
headerlink
helloerror
Hellow
hexstring
hicolor
HKCR
HKCU
Expand Down Expand Up @@ -242,6 +242,7 @@ iodepth
ioengine
ionicons
ionicstorage
ipinfo
iqmp
itemsoverlay
JAVACMD
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ jobs:
# GitHub Actions apt proxy is super unstable
# see https://github.com/actions/runner-images/issues/7048
run: |
set -e -o pipefail
set -eux -o pipefail
COUNTRY=$(curl ipinfo.io | jq -r .country)
MIRROR_FILE=$(mktemp)
curl "http://mirrors.ubuntu.com/$COUNTRY.txt" > $MIRROR_FILE
(
# make sure there is a `\t` between URL and `priority:*` attributes
printf 'http://azure.archive.ubuntu.com/ubuntu priority:1\n';
curl http://mirrors.ubuntu.com/mirrors.txt | grep https
grep -e '^https' $MIRROR_FILE
) | sudo tee /etc/apt/mirrors.txt
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list
Expand Down

0 comments on commit 13a07cf

Please sign in to comment.