Skip to content

Commit e780ecc

Browse files
fix sdk parsing
1 parent a992b10 commit e780ecc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ jobs:
3838
- name: Determine latest OpenWrt SDK version
3939
id: sdk_version
4040
run: |
41-
# Use wget or curl to scrape the OpenWrt download server and extract the latest SDK tar file URL
41+
# Use curl to scrape the OpenWrt download server and extract the latest SDK tar file URL
4242
SDK_URL=$(curl -s https://downloads.openwrt.org/snapshots/targets/ath79/generic/ | \
43-
grep -oP 'href="\K[^"]*-gcc-[^"]+_musl.Linux-x86_64.tar.zst' | \
44-
sort -V | tail -n 1)
43+
grep -oP 'href="openwrt-sdk-[^"]+\.tar\.zst"' | \
44+
sort -V | tail -n 1 | \
45+
sed 's/href="//' | sed 's/"//')
46+
4547
echo "Latest OpenWrt SDK URL: https://downloads.openwrt.org/snapshots/targets/ath79/generic/$SDK_URL"
48+
49+
# Save the SDK URL into an environment variable so it can be used in the next steps
4650
echo "sdk_url=https://downloads.openwrt.org/snapshots/targets/ath79/generic/$SDK_URL" >> $GITHUB_ENV
4751
4852
# Step 5: Download OpenWrt SDK if not cached

0 commit comments

Comments
 (0)