Skip to content

Commit afadf3e

Browse files
committed
update mirrors
1 parent 7686caa commit afadf3e

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

.github/workflows/build-deploy.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,35 @@ jobs:
5050
popd >/dev/null 2>&1
5151
continue-on-error: true
5252

53+
- name: Update Mirrors
54+
run: |
55+
#Presets
56+
set +x ; set +e
57+
#--------------#
58+
pushd "$(mktemp -d)" >/dev/null 2>&1
59+
wget "https://bin.pkgforge.dev/$(uname -m)/rate-mirrors" -O "./rate-mirrors" && chmod +x "./rate-mirrors"
60+
if [[ -s "./rate-mirrors" && $(stat -c%s "./rate-mirrors") -gt 10 ]]; then
61+
##386
62+
pushd "$(mktemp -d)" >/dev/null 2>&1
63+
curl -qfsSL "https://archlinux32.org/mirrorlist/?country=all&protocol=https" -o "./mirrors.txt"
64+
sed -i '/^#Server/s/^#//' "./mirrors.txt"
65+
if [[ -s "./mirrors.txt" && $(wc -l < "./mirrors.txt") -gt 3 ]]; then
66+
cat "./mirrors.txt" | tee "${GITHUB_WORKSPACE}/main/rootfs/386/etc/pacman.d/mirrorlist"
67+
fi
68+
popd >/dev/null 2>&1
69+
##Arm64/Armv7
70+
pushd "$(mktemp -d)" >/dev/null 2>&1
71+
wget "https://bin.pkgforge.dev/$(uname -m)/rate-mirrors" -O "./rate-mirrors" && chmod +x "./rate-mirrors"
72+
"./rate-mirrors" --allow-root --disable-comments-in-file --save "./mirrors.txt" archarm
73+
if [[ -s "./mirrors.txt" && $(wc -l < "./mirrors.txt") -gt 3 ]]; then
74+
cat "./mirrors.txt" | tee "${GITHUB_WORKSPACE}/main/rootfs/arm64/etc/pacman.d/mirrorlist"
75+
cat "./mirrors.txt" | tee "${GITHUB_WORKSPACE}/main/rootfs/armv7/etc/pacman.d/mirrorlist"
76+
fi
77+
popd >/dev/null 2>&1
78+
fi
79+
popd >/dev/null 2>&1
80+
continue-on-error: true
81+
5382
- name: Set up QEMU
5483
uses: docker/setup-qemu-action@v3
5584
continue-on-error: true
@@ -84,4 +113,4 @@ jobs:
84113
${{ env.GHCR_NAME }}:latest
85114
${{ env.GHCR_NAME }}:${{ env.DOCKER_TAG }}
86115
push: true
87-
continue-on-error: true
116+
continue-on-error: true
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Server list generated by rankmirrors on 2023-08-30
1+
## https://archlinux.org/mirrorlist/?country=all&protocol=https&ip_version=4&ip_version=6
2+
## Arch Linux repository mirrorlist
3+
## Generated on 2024-12-25
4+
##
5+
6+
## Worldwide
27
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
3-
Server = https://mirror.leaseweb.net/archlinux/$repo/os/$arch
48
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
9+
Server = https://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch

0 commit comments

Comments
 (0)