fix build 前端下载最新Release而不是同版本号Release

This commit is contained in:
jxxghp 2023-08-22 10:44:09 +08:00
parent c9452d29c1
commit 064cf4c5c3
2 changed files with 4 additions and 3 deletions

View File

@ -55,7 +55,7 @@ jobs:
linux/arm64
push: true
build-args: |
MOVIEPILOT_FRONTEND_VERSION=${{ env.app_version }}
MOVIEPILOT_VERSION=${{ env.app_version }}
tags: |
${{ secrets.DOCKER_USERNAME }}/moviepilot:latest
${{ secrets.DOCKER_USERNAME }}/moviepilot:${{ env.app_version }}

View File

@ -1,5 +1,5 @@
FROM python:3.11.4-slim-bullseye
ARG MOVIEPILOT_FRONTEND_VERSION
ARG MOVIEPILOT_VERSION
ENV LANG="C.UTF-8" \
HOME="/moviepilot" \
TERM="xterm" \
@ -69,7 +69,8 @@ RUN apt-get update \
&& echo 'fs.inotify.max_user_watches=5242880' >> /etc/sysctl.conf \
&& echo 'fs.inotify.max_user_instances=5242880' >> /etc/sysctl.conf \
&& locale-gen zh_CN.UTF-8 \
&& curl -sL "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/v${MOVIEPILOT_FRONTEND_VERSION}/dist.zip" | busybox unzip -d / - \
&& FRONTEND_VERSION=$(curl -sL "https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases/latest" | jq -r .tag_name) \
&& curl -sL "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/v${FRONTEND_VERSION}/dist.zip" | busybox unzip -d / - \
&& mv /dist /public \
&& apt-get remove -y build-essential \
&& apt-get autoremove -y \