Skip to content

Commit 0e33727

Browse files
committed
feat(func): media library build test
1 parent 879870e commit 0e33727

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/beta_media_release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,18 @@ jobs:
9090
go-version: "1.25.0"
9191

9292
- name: Setup web
93-
run: bash build.sh dev web
93+
run: |
94+
frontendRepo="${FRONTEND_REPO:-OpenListTeam/OpenList-Frontend}"
95+
release_json=$(curl -fsSL --max-time 10 \
96+
-H "Authorization: Bearer $GITHUB_TOKEN" \
97+
-H "Accept: application/vnd.github.v3+json" \
98+
"https://api.github.com/repos/$frontendRepo/releases/tags/beta-media")
99+
tar_url=$(echo "$release_json" | jq -r '.assets[].browser_download_url' | grep "openlist-frontend-dist" | grep -v "lite" | grep "\.tar\.gz$")
100+
echo "Downloading frontend from: $tar_url"
101+
curl -fsSL "$tar_url" -o dist.tar.gz
102+
rm -rf public/dist && mkdir -p public/dist
103+
tar -zxvf dist.tar.gz -C public/dist
104+
rm -rf dist.tar.gz
94105
env:
95106
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96107
FRONTEND_REPO: ${{ vars.FRONTEND_REPO }}

0 commit comments

Comments
 (0)