diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 7a6f51de8..69fd20275 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -60,7 +60,7 @@ jobs: else DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" fi - echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \ + echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --build-arg MAXKB_VERSION="${{ github.event.inputs.dockerImageTag }} (build at $(TZ=Asia/Shanghai date +'%Y-%m-%d %H:%M:%S'))" --no-cache \ ${DOCKER_IMAGE_TAGS} . - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -115,7 +115,7 @@ jobs: else DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" fi - echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \ + echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --build-arg MAXKB_VERSION="${{ github.event.inputs.dockerImageTag }} (build at $(TZ=Asia/Shanghai date +'%Y-%m-%d %H:%M:%S'))" --no-cache \ ${DOCKER_IMAGE_TAGS} . env - name: Set up QEMU diff --git a/installer/Dockerfile b/installer/Dockerfile index d20666010..8513c81f6 100644 --- a/installer/Dockerfile +++ b/installer/Dockerfile @@ -8,6 +8,8 @@ RUN cd ui && \ rm -rf ./node_modules FROM ghcr.io/1panel-dev/maxkb-python-pg:python3.11.8-pg15.3 +ARG MAXKB_VERSION=dev +ENV MAXKB_VERSION=${MAXKB_VERSION} # 创建工作目录 RUN mkdir -p /opt/maxkb/app && mkdir -p /opt/maxkb/model && mkdir -p /opt/maxkb/conf # 拷贝项目