From 639c2bdeff7e96c0c0011d031570f7db2da21508 Mon Sep 17 00:00:00 2001 From: Jiacai Liu Date: Thu, 2 Feb 2023 14:15:04 +0800 Subject: [PATCH] chore: make nightly image name readable (#604) * chore: update nightly name * Update .github/workflows/dockerhub-publish-nightly.yml Co-authored-by: WEI Xikai --------- Co-authored-by: WEI Xikai --- .github/workflows/dockerhub-publish-nightly.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dockerhub-publish-nightly.yml b/.github/workflows/dockerhub-publish-nightly.yml index 2670d22521..7140f9001b 100644 --- a/.github/workflows/dockerhub-publish-nightly.yml +++ b/.github/workflows/dockerhub-publish-nightly.yml @@ -19,12 +19,14 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set datetime + - name: Set Environment Variables run: | - echo "BUILD_DATE=$(TZ=':Asia/Shanghai' date '+%Y%m%d%H%M%S')" >> $GITHUB_ENV + echo "BUILD_DATE=$(TZ=':Asia/Shanghai' date '+%Y%m%d')" >> $GITHUB_ENV + # only first 7 chars of commit id + echo "COMMIT_ID=${GITHUB_SHA::7}" >> $GITHUB_ENV - name: Build and Push CeresDB Server Docker Image uses: docker/build-push-action@v3 with: context: . push: true - tags: ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}-${{ github.sha }} + tags: ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}-${{ env.COMMIT_ID }}