Skip to content

Commit 73d225a

Browse files
committed
fix(ci): replace the runner-provided mirror list
1 parent 0e1b5c8 commit 73d225a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎.github/actions/setup-apt-mirrors/action.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ runs:
55
steps:
66
- shell: bash
77
run: |
8+
# Replace the existing Blacksmith mirror list as well as direct sources.
89
printf '%s\tpriority:%s\n' \
910
https://archive.ubuntu.com/ubuntu 1 \
1011
https://mirrors.edge.kernel.org/ubuntu 2 \
1112
https://mirror.math.princeton.edu/pub/ubuntu 3 \
12-
| sudo tee /etc/apt/ubuntu-mirrors.txt > /dev/null
13+
| sudo tee /etc/apt/blacksmith-ubuntu-mirrors.txt > /dev/null
1314
1415
# APT's mirror transport retries each file against the next server.
1516
sudo find /etc/apt -maxdepth 2 -type f \( -name '*.list' -o -name '*.sources' \) \
1617
-exec sed -i -E \
17-
's#https?://(([^/]+\.)?archive|security)\.ubuntu\.com/ubuntu/?#mirror+file:/etc/apt/ubuntu-mirrors.txt#g' {} +
18+
's#https?://(([^/]+\.)?archive|security)\.ubuntu\.com/ubuntu/?#mirror+file:/etc/apt/blacksmith-ubuntu-mirrors.txt#g' {} +
1819
1920
# Move on to a fallback before an unreachable server exhausts the job.
2021
printf '%s\n' 'Acquire::http::Timeout "15";' 'Acquire::https::Timeout "15";' \

0 commit comments

Comments
 (0)