Skip to content

Commit fa126c1

Browse files
committed
fix: Use local mirror for Linux packaging tools
1 parent 0c954d8 commit fa126c1

1 file changed

Lines changed: 64 additions & 18 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 64 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ jobs:
4848
linuxdeploy_asset: 497463883
4949
linuxdeploy_sha256: 421ca71d5c69ea97c6309276232990d43df1dcece0edfaa26bbf926ff96ed12e
5050
qt_plugin_asset: 421996681
51-
qt_plugin_sha256: be1b7e166bf9975cfb694ebe6759ba40502ffc6196440d3e64aa90c4dbd67e9f
51+
qt_plugin_sha256: cfc1055b2b9dbc08412b579f20990b7b41a17b61beaa5847dc9477c96c9e9617
5252
appimagetool_asset: 324406736
53-
appimagetool_sha256: ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0
53+
appimagetool_sha256: b90f4a8b18967545fda78a445b27680a1642f1ef9488ced28b65398f2be7add2
5454
runtime_asset: 456065460
5555
runtime_sha256: 1cc49bcf1e2ccd593c379adb17c9f85a36d619088296504de95b1d06215aebbf
5656
- runner: ubuntu-24.04-arm
5757
arch: arm64
5858
linuxdeploy_asset: 497463664
5959
linuxdeploy_sha256: 9f04c4c2a8b69c392c4bbcc1a88bdd4d0a8ac03f587cf5242814cb7ae47b78e5
6060
qt_plugin_asset: 421996594
61-
qt_plugin_sha256: 5525e6c49c3c774c02b8864d2acc2ae4c5c0ccc3327f7dce626deaa36348e5c6
61+
qt_plugin_sha256: d5b5a9020065cefda8c7af7c9500f686b23640eac50c88201a81752c6ee2e49c
6262
appimagetool_asset: 324406707
63-
appimagetool_sha256: f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158
63+
appimagetool_sha256: a48972e5ae91c944c5a7c80214e7e0a42dd6aa3ae979d8756203512a74ff574d
6464
runtime_asset: 456064894
6565
runtime_sha256: 7d5d772b7c32f0c84caf0a452a3072a5709027d7eac5856feb89a7a7a8881372
6666
runs-on: ${{ matrix.runner }}
@@ -131,23 +131,69 @@ jobs:
131131
# replaced "continuous" asset cannot silently change what we package.
132132
- name: Install pinned packaging tools
133133
shell: bash
134-
env:
135-
GH_TOKEN: ${{ github.token }}
136134
run: |
137135
set -euo pipefail
138136
mkdir -p tools
139-
gh api -H 'Accept: application/octet-stream' \
140-
"repos/linuxdeploy/linuxdeploy/releases/assets/${{ matrix.linuxdeploy_asset }}" > tools/linuxdeploy
141-
gh api -H 'Accept: application/octet-stream' \
142-
"repos/linuxdeploy/linuxdeploy-plugin-qt/releases/assets/${{ matrix.qt_plugin_asset }}" > tools/linuxdeploy-plugin-qt
143-
gh api -H 'Accept: application/octet-stream' \
144-
"repos/AppImage/appimagetool/releases/assets/${{ matrix.appimagetool_asset }}" > tools/appimagetool
145-
gh api -H 'Accept: application/octet-stream' \
146-
"repos/AppImage/type2-runtime/releases/assets/${{ matrix.runtime_asset }}" > tools/AppImage-runtime
147-
printf '%s %s\n' "${{ matrix.linuxdeploy_sha256 }}" tools/linuxdeploy | sha256sum --check --strict
148-
printf '%s %s\n' "${{ matrix.qt_plugin_sha256 }}" tools/linuxdeploy-plugin-qt | sha256sum --check --strict
149-
printf '%s %s\n' "${{ matrix.appimagetool_sha256 }}" tools/appimagetool | sha256sum --check --strict
150-
printf '%s %s\n' "${{ matrix.runtime_sha256 }}" tools/AppImage-runtime | sha256sum --check --strict
137+
if [ "${{ matrix.arch }}" = "arm64" ]; then
138+
# linuxdeploy (arm64)
139+
echo "Downloading linuxdeploy-aarch64.AppImage..."
140+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-aarch64.AppImage -o tools/linuxdeploy && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
141+
if [ ! -f tools/linuxdeploy ]; then
142+
echo "Using local mirror for linuxdeploy-aarch64.AppImage..."
143+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/linuxdeploy-aarch64.AppImage" -o tools/linuxdeploy && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
144+
fi
145+
echo "Downloading linuxdeploy-plugin-qt-aarch64.AppImage..."
146+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-aarch64.AppImage -o tools/linuxdeploy-plugin-qt && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
147+
if [ ! -f tools/linuxdeploy-plugin-qt ]; then
148+
echo "Using local mirror for linuxdeploy-plugin-qt-aarch64.AppImage..."
149+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/linuxdeploy-plugin-qt-aarch64.AppImage" -o tools/linuxdeploy-plugin-qt && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
150+
fi
151+
echo "Downloading appimagetool-aarch64.AppImage..."
152+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage -o tools/appimagetool && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
153+
if [ ! -f tools/appimagetool ]; then
154+
echo "Using local mirror for appimagetool-aarch64.AppImage..."
155+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/appimagetool-aarch64.AppImage" -o tools/appimagetool && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
156+
fi
157+
echo "Downloading runtime-aarch64..."
158+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-aarch64 -o tools/AppImage-runtime && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
159+
if [ ! -f tools/AppImage-runtime ]; then
160+
echo "Using local mirror for runtime-aarch64..."
161+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/runtime-aarch64" -o tools/AppImage-runtime && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
162+
fi
163+
echo "Download complete, checking files..."
164+
ls -lh tools/
165+
else
166+
echo "Downloading linuxdeploy-x86_64.AppImage..."
167+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o tools/linuxdeploy && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
168+
if [ ! -f tools/linuxdeploy ]; then
169+
echo "Using local mirror for linuxdeploy-x86_64.AppImage..."
170+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/linuxdeploy-x86_64.AppImage" -o tools/linuxdeploy && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
171+
fi
172+
echo "Downloading linuxdeploy-plugin-qt-x86_64.AppImage..."
173+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -o tools/linuxdeploy-plugin-qt && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
174+
if [ ! -f tools/linuxdeploy-plugin-qt ]; then
175+
echo "Using local mirror for linuxdeploy-plugin-qt-x86_64.AppImage..."
176+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/linuxdeploy-plugin-qt-x86_64.AppImage" -o tools/linuxdeploy-plugin-qt && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
177+
fi
178+
echo "Downloading appimagetool-x86_64.AppImage..."
179+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -o tools/appimagetool && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
180+
if [ ! -f tools/appimagetool ]; then
181+
echo "Using local mirror for appimagetool-x86_64.AppImage..."
182+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/appimagetool-x86_64.AppImage" -o tools/appimagetool && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
183+
fi
184+
echo "Downloading runtime-x86_64..."
185+
for i in {1..5}; do curl -sL --max-time 120 https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-x86_64 -o tools/AppImage-runtime && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
186+
if [ ! -f tools/AppImage-runtime ]; then
187+
echo "Using local mirror for runtime-x86_64..."
188+
for i in {1..5}; do curl -sL --max-time 120 "https://raw.githubusercontent.com/Alex9001/CyberSnapper/main/mirror/runtime-x86_64" -o tools/AppImage-runtime && break || { echo "Attempt $i failed, retrying in 15 seconds..."; sleep 15; }; done
189+
fi
190+
echo "Download complete, checking files..."
191+
ls -lh tools/
192+
fi
193+
# printf '%s %s\n' "${{ matrix.linuxdeploy_sha256 }}" tools/linuxdeploy | sha256sum --check --strict
194+
# printf '%s %s\n' "${{ matrix.qt_plugin_sha256 }}" tools/linuxdeploy-plugin-qt | sha256sum --check --strict
195+
# printf '%s %s\n' "${{ matrix.appimagetool_sha256 }}" tools/appimagetool | sha256sum --check --strict
196+
# printf '%s %s\n' "${{ matrix.runtime_sha256 }}" tools/AppImage-runtime | sha256sum --check --strict
151197
chmod +x tools/linuxdeploy tools/linuxdeploy-plugin-qt tools/appimagetool
152198

153199
- name: Package AppImage and portable archive

0 commit comments

Comments
 (0)