Skip to content

Commit ecb794b

Browse files
committed
Add date-based docker image tag
1 parent d74e48e commit ecb794b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/build-publish.yml

+5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ jobs:
2727
username: ${{ github.actor }}
2828
password: ${{ github.token }}
2929

30+
- name: set date-based tag
31+
run: |
32+
echo "DATE_TAG=$(date +%Y-%m-%dT%H-%M)" >> $GITHUB_ENV
33+
3034
- name: build and push Docker image
3135
uses: docker/build-push-action@v5
3236
with:
3337
push: true
3438
tags: |
3539
ghcr.io/${{ github.repository }}:latest
40+
ghcr.io/${{ github.repository }}:${{ env.DATE_TAG }}
3641
platforms: linux/amd64,linux/arm64
3742
# https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api
3843
cache-from: type=gha

0 commit comments

Comments
 (0)