Skip to content

Commit 753c7ca

Browse files
committed
📦 build(docker): add date-based image tagging
- add automatic date-based tag (YYYY.MM.DD format) for docker images - improve image versioning and traceability in container registry
1 parent b1cfb0c commit 753c7ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ jobs:
7474
uses: docker/setup-buildx-action@v3
7575
- name: Build
7676
uses: docker/build-push-action@v6
77+
env:
78+
DATE: $(date +"%Y.%m.%d")
7779
with:
7880
context: .
7981
file: docker/Dockerfile
8082
push: true
8183
tags: |
8284
${{ env.IMAGE_FULL_NAME }}:${{ env.IMAGE_TAG }}
85+
${{ env.IMAGE_FULL_NAME }}:${{ env.DATE }}
8386
${{ github.event.inputs.image_tag != 'latest' && format('{0}:latest', env.IMAGE_FULL_NAME) || '' }}
8487
cache-from: type=gha
8588
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)