Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

ci: Linux package installs retry, then fall back to archive.ubuntu.com when GitHub's Azure mirror can't be reached

christianmat3738a3133841
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8658c5aa..29332c05 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -84,7 +84,17 @@ jobs:
cache: pnpm
- name: Linux build and test packages
if: runner.os == 'Linux'
- run: sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends libpulse-dev pkg-config pulseaudio >/dev/null
+ # GitHub's Azure Ubuntu mirror sometimes can't be reached: after a failed try, use Ubuntu's own servers
+ run: |
+ get() { sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends libpulse-dev pkg-config pulseaudio >/dev/null; }
+ for i in 1 2 3; do
+ get && exit 0
+ echo "::warning::apt try $i failed; switching to archive.ubuntu.com"
+ echo 'http://archive.ubuntu.com/ubuntu/' | sudo tee /etc/apt/apt-mirrors.txt >/dev/null
+ sudo sed -i 's#http://azure.archive.ubuntu.com#http://archive.ubuntu.com#g' /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources 2>/dev/null || true
+ sleep 10
+ done
+ exit 1
- name: Rust build cache
uses: actions/cache@v4
with:
diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml
index ffa5b4c7..e0488ba6 100644
--- a/.github/workflows/preview.yml
+++ b/.github/workflows/preview.yml
@@ -57,7 +57,17 @@ jobs:
cache: pnpm
- name: Linux build and test packages
if: runner.os == 'Linux'
- run: sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends libpulse-dev pkg-config pulseaudio xvfb >/dev/null
+ # GitHub's Azure Ubuntu mirror sometimes can't be reached: after a failed try, use Ubuntu's own servers
+ run: |
+ get() { sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends libpulse-dev pkg-config pulseaudio xvfb >/dev/null; }
+ for i in 1 2 3; do
+ get && exit 0
+ echo "::warning::apt try $i failed; switching to archive.ubuntu.com"
+ echo 'http://archive.ubuntu.com/ubuntu/' | sudo tee /etc/apt/apt-mirrors.txt >/dev/null
+ sudo sed -i 's#http://azure.archive.ubuntu.com#http://archive.ubuntu.com#g' /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources 2>/dev/null || true
+ sleep 10
+ done
+ exit 1
- name: Rust build cache
uses: actions/cache@v4
with: