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 232ebb0 commit 2b239cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
fi
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'), commit: ${GITHUB_SHA::8})"' --no-cache \
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 \
${DOCKER_IMAGE_TAGS} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -115,9 +116,9 @@ jobs:
else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
fi
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'), commit: ${GITHUB_SHA::8})"' --no-cache \
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 \
${DOCKER_IMAGE_TAGS} .
env
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down

0 comments on commit 2b239cf

Please sign in to comment.