Skip to content

Commit

Permalink
Add SHA and date to the image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nonylene committed Jan 1, 2024
1 parent 84d97ab commit 8cbcb32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ name: Docker
on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]

Expand Down Expand Up @@ -66,6 +64,8 @@ jobs:
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value={{sha}}-{{date 'YYYYMMDDHHmmss'}}
flavor: |
latest=${{ github.ref == 'refs/heads/main' }}
Expand Down

0 comments on commit 8cbcb32

Please sign in to comment.