Skip to content
This repository was archived by the owner on Jul 21, 2024. It is now read-only.

Commit 25ecc8c

Browse files
committed
* update github action docker.yml
1 parent 386c1dd commit 25ecc8c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/docker.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ on:
2121
required: true
2222
default: 'warning'
2323
tags:
24-
description: 'Test scenario tags'
24+
description: 'Test scenario tags'
25+
26+
env:
27+
TZ: Asia/Shanghai
2528

2629
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2730
jobs:
@@ -34,7 +37,7 @@ jobs:
3437
-
3538
name: Get current date
3639
id: date
37-
run: echo "::set-output name=today::$(date +'%Y-%m-%d')"
40+
run: echo "::set-output name=today::$(date +'%Y%m%d')"
3841
-
3942
name: Set up QEMU
4043
uses: docker/setup-qemu-action@v1
@@ -70,9 +73,11 @@ jobs:
7073
with:
7174
username: ${{ secrets.DOCKERHUB_USERNAME }}
7275
password: ${{ secrets.DOCKERHUB_TOKEN }}
76+
# Set VERSION_INFORMATION
77+
- run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q ciPrintVersionInformation)" >> $GITHUB_ENV
7378
- name: Push to Docker Hub
7479
run: docker push eritpchy/webdav-aliyundriver:latest
7580
- name: Push to Docker Hub
76-
run: docker push eritpchy/webdav-aliyundriver:2.4.0-${{ steps.date.outputs.today }}
81+
run: docker push eritpchy/webdav-aliyundriver:${{ env.VERSION_INFORMATION }}-${{ steps.date.outputs.today }}
7782

7883

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ tasks.named('test') {
4141
useJUnitPlatform()
4242
}
4343

44+
task ciPrintVersionInformation {
45+
println version
46+
}
47+
4448
bootBuildImage {
4549
builder = 'maliksalman/paketobuildpacks-builder-tiny:focal-1.0.2'
4650
environment = [

0 commit comments

Comments
 (0)