Skip to content

Commit

Permalink
feat: 增加版本号环境变量
Browse files Browse the repository at this point in the history
  • Loading branch information
liqiang-fit2cloud committed Mar 21, 2024
1 parent 2b239cf commit 529bc38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
fi
MAXKB_VERSION="${{ github.event.inputs.dockerImageTag }} (build at $(TZ=Asia/Shanghai date +'%Y-%m-%d %H:%M:%S'), commit: ${GITHUB_SHA::8})"
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --build-arg MAXKB_VERSION="${MAXKB_VERSION}" --no-cache \
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
--build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \
${DOCKER_IMAGE_TAGS} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -116,8 +116,8 @@ jobs:
else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
fi
MAXKB_VERSION="${{ github.event.inputs.dockerImageTag }} (build at $(TZ=Asia/Shanghai date +'%Y-%m-%d %H:%M:%S'), commit: ${GITHUB_SHA::8})"
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --build-arg MAXKB_VERSION="${MAXKB_VERSION}" --no-cache \
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
--build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \
${DOCKER_IMAGE_TAGS} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
4 changes: 2 additions & 2 deletions installer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +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}

ENV MAXKB_VERSION=${DOCKER_IMAGE_TAG} (build at ${BUILD_AT}, commit: ${GITHUB_COMMIT})
# 创建工作目录
RUN mkdir -p /opt/maxkb/app && mkdir -p /opt/maxkb/model && mkdir -p /opt/maxkb/conf
# 拷贝项目
Expand Down

0 comments on commit 529bc38

Please sign in to comment.