diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3649cedd..630410e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -658,7 +658,7 @@ jobs: update-latest-version: name: Update Latest Version needs: [build-check, upload-release-assets] - if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.is_prerelease == 'false' + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: - name: Update latest.json diff --git a/Dockerfile b/Dockerfile index 85b39754..3ba1ac67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,13 @@ RUN case "${TARGETARCH}" in \ arm64) ARCH="aarch64" ;; \ *) echo "Unsupported architecture: ${TARGETARCH}" >&2 && exit 1 ;; \ esac && \ + if [ "${RELEASE}" = "latest" ]; then \ + VERSION="latest"; \ + else \ + VERSION="v${RELEASE#v}"; \ + fi && \ BASE_URL="https://dl.rustfs.com/artifacts/rustfs/release" && \ - PACKAGE_NAME="rustfs-linux-${ARCH}-${RELEASE#v}.zip" && \ + PACKAGE_NAME="rustfs-linux-${ARCH}-${VERSION}.zip" && \ DOWNLOAD_URL="${BASE_URL}/${PACKAGE_NAME}" && \ echo "Downloading ${PACKAGE_NAME} from ${DOWNLOAD_URL}" >&2 && \ curl -f -L "${DOWNLOAD_URL}" -o rustfs.zip && \