1818
1919 build :
2020 runs-on : ubuntu-latest
21- timeout-minutes : 15
21+ timeout-minutes : 30
2222
2323 steps :
2424 - uses : actions/checkout@v4
@@ -27,10 +27,48 @@ jobs:
2727
2828 - name : Workaround for sources.list
2929 run : |
30- # workaround disabled, splitting the load between azure and arizona.edu to avoid timeouts
30+ # Replace sources
3131
32- # See reference code in test-build.yml for various sources that may be updated. Enable as needed here.
33- echo "Workaround for sources.list disabled for this workflow"
32+ set -euxo pipefail
33+
34+ # Peek (what repos are active now)
35+ apt-cache policy
36+ grep -RInE '^(deb|Types|URIs)' /etc/apt || true
37+
38+ # Enable nullglob so *.list/*.sources that don't exist don't break sed
39+ shopt -s nullglob
40+
41+ echo "Replace sources.list (legacy)"
42+ sudo sed -i \
43+ -e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
44+ /etc/apt/sources.list || true
45+
46+ echo "Replace sources.list.d/*.list (legacy)"
47+ for f in /etc/apt/sources.list.d/*.list; do
48+ sudo sed -i \
49+ -e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
50+ "$f"
51+ done
52+
53+ echo "Replace sources.list.d/*.sources (deb822)"
54+ for f in /etc/apt/sources.list.d/*.sources; do
55+ sudo sed -i \
56+ -e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
57+ -e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
58+ "$f"
59+ done
60+
61+ echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
62+ if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
63+ # Replace azure with our mirror (idempotent)
64+ sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
65+ fi
66+
67+ # Peek (verify changes)
68+ grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
69+ grep -RInE '^(deb|Types|URIs)' /etc/apt || true
70+ echo "--- apt-mirrors.txt ---"
71+ cat /etc/apt/apt-mirrors.txt || true
3472
3573 - name : Update repository
3674 run : sudo apt-get update
0 commit comments