Skip to content

Commit 41c6e3b

Browse files
committed
add time and date to extra tag
1 parent 6728e8c commit 41c6e3b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/image.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
registry: ghcr.io
2121
username: ${{ github.actor }}
2222
password: ${{ secrets.GITHUB_TOKEN }}
23-
23+
- name: Get current date
24+
id: date
25+
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%h-%M')"
2426
- name: Build and push Docker image dev
2527
if: github.ref_name == 'dev'
2628
uses: docker/build-push-action@v5
@@ -30,7 +32,7 @@ jobs:
3032
push: true
3133
build-args: |
3234
"VERSION=${{ github.sha }}-dev"
33-
tags: ghcr.io/linalinn/kicad-render:dev
35+
tags: ghcr.io/linalinn/kicad-render:dev.ghcr.io/linalinn/kicad-render:nightly-${{ steps.date.outputs.date }}
3436

3537
- name: Build and push Docker image
3638
if: github.ref_name == github.event.repository.default_branch
@@ -41,4 +43,4 @@ jobs:
4143
push: true
4244
build-args: |
4345
"VERSION=${{ github.sha }}"
44-
tags: ghcr.io/linalinn/kicad-render:nightly
46+
tags: ghcr.io/linalinn/kicad-render:nightly,ghcr.io/linalinn/kicad-render:nightly-${{ steps.date.outputs.date }}

0 commit comments

Comments
 (0)