diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8fc2412f..bd3bf1b5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -19,7 +19,7 @@ jobs: path: ~/.m2 key: jetlinks-community-maven-repository - name: Build with Maven - run: mvn clean install -Dmaven.test.skip=true -Pbuild && cd jetlinks-standalone && docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-standalone:$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) . + run: mvn clean install -Dmaven.build.timestamp="$(date "+%Y-%m-%d %H:%M:%S")" -Dmaven.test.skip=true -Pbuild && cd jetlinks-standalone && docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-standalone:$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) . - name: Login Docker Repo run: echo "${{ secrets.ALIYUN_DOCKER_REPO_PWD }}" | docker login registry.cn-shenzhen.aliyuncs.com -u ${{ secrets.ALIYUN_DOCKER_REPO_USERNAME }} --password-stdin - name: Push Docker diff --git a/build-and-push-docker.sh b/build-and-push-docker.sh index e6742205..dffff12a 100755 --- a/build-and-push-docker.sh +++ b/build-and-push-docker.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash dockerImage=registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-standalone:$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) -./mvnw clean package -Dmaven.test.skip=true +./mvnw clean package -Dmaven.test.skip=true -Dmaven.build.timestamp="$(date "+%Y-%m-%d %H:%M:%S")" if [ $? -ne 0 ];then echo "构建失败!" else