Skip to content

Commit

Permalink
Update build-template.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqsl authored Mar 20, 2024
1 parent 7deece4 commit 417d13a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
images: ${{ inputs.REGISTRY }}/${{ inputs.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='America/Vancouver'}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand All @@ -68,9 +69,12 @@ jobs:
with:
context: ${{ inputs.IMAGE_CONTEXT }}
build-contexts: ${{ inputs.BUILD_CONTEXT }}
build-args: |
VERSION=${{ fromJSON(steps.meta.outputs.json).tags['org.opencontainers.image.created'] }}
file: ${{ inputs.IMAGE_FILE }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 417d13a

Please sign in to comment.