Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hlc23 committed Jan 14, 2024
1 parent 62f6e75 commit 2eeb46a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Set date variable
run: echo "DATE=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
Expand All @@ -77,7 +80,7 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ github.repository_owner }}/${{ github.repository }}:$(date +'%Y%m%d%H%M%S')
tags: ${{ github.repository }}:${{ env.DATE }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down

0 comments on commit 2eeb46a

Please sign in to comment.