mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-23 09:19:06 +00:00
fix(ci): normalize Ubuntu package mirrors
- replace unreachable Azure runner mirrors with the HTTPS Ubuntu archive - retain bounded apt retries and timeout safeguards
This commit is contained in:
@@ -53,6 +53,16 @@ jobs:
|
||||
- name: Install Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
# The hosted Ubuntu image can expose an unreachable Azure mirror in
|
||||
# its apt sources while the public Ubuntu archive is reachable.
|
||||
# Normalize every apt source, including the image's mirror list,
|
||||
# before refreshing indexes so a transient runner-local mirror does
|
||||
# not consume the whole job timeout.
|
||||
sudo find /etc/apt -type f \
|
||||
-exec sed -i \
|
||||
-e 's#http://azure\.archive\.ubuntu\.com#https://archive.ubuntu.com#g' \
|
||||
-e 's#https://azure\.archive\.ubuntu\.com#https://archive.ubuntu.com#g' \
|
||||
{} +
|
||||
sudo env DEBIAN_FRONTEND=noninteractive timeout --foreground --signal=TERM --kill-after=30s 10m apt-get \
|
||||
-o Acquire::Retries=3 \
|
||||
-o Acquire::http::Timeout=30 \
|
||||
|
||||
Reference in New Issue
Block a user