mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
fix(agent): start sessions from their own task so repeat starts aren't swallowed (#2468)
* fix(agent): start sessions from their own task so repeat starts aren't swallowed * fix(ci): fall back to the kernel.org Ubuntu mirror when Canonical's are unreachable * fix(ci): fall back to the Berkeley ports mirror on arm64 runners
This commit is contained in:
1 parent
f16b023f0d
commit
c265b66e80
5 files changed
+53
-9
No files matched your search
@@ -31,15 +31,22 @@ install_packages() {
|
||||
if install_packages; then
|
||||
exit 0
|
||||
fi
|
||||
echo "::warning::Runner mirror failed or timed out; retrying with the official Ubuntu mirror."
|
||||
[ -f "$ubuntu_sources" ] || exit 1
|
||||
sources=$(mktemp --suffix=.sources)
|
||||
trap 'rm -f "$sources"' EXIT
|
||||
mirror=https://archive.ubuntu.com/ubuntu
|
||||
# The last mirror of each list is outside Canonical's network, so it still answers when runners cannot reach Canonical.
|
||||
mirrors=(https://archive.ubuntu.com/ubuntu https://mirrors.edge.kernel.org/ubuntu)
|
||||
case "$(dpkg --print-architecture)" in
|
||||
arm64) mirror=https://ports.ubuntu.com/ubuntu-ports ;;
|
||||
arm64) mirrors=(https://ports.ubuntu.com/ubuntu-ports https://mirrors.ocf.berkeley.edu/ubuntu-ports) ;;
|
||||
esac
|
||||
sed -E "s@^URIs:.*@URIs: $mirror@" "$ubuntu_sources" > "$sources"
|
||||
chmod 644 "$sources"
|
||||
options[1]="Dir::Etc::sourcelist=$sources"
|
||||
install_packages
|
||||
status=1
|
||||
for mirror in "${mirrors[@]}"; do
|
||||
echo "::warning::Ubuntu mirror failed or timed out; retrying with $mirror."
|
||||
sed -E "s@^URIs:.*@URIs: $mirror@" "$ubuntu_sources" > "$sources"
|
||||
chmod 644 "$sources"
|
||||
options[1]="Dir::Etc::sourcelist=$sources"
|
||||
status=0
|
||||
install_packages || status=$?
|
||||
[ "$status" = 0 ] && exit 0
|
||||
done
|
||||
exit "$status"
|
||||
Reference in new issue
Block a user