From 417d13a443527b775877e459dc428c1a2641626a Mon Sep 17 00:00:00 2001 From: Yossi T <48697347+ytqsl@users.noreply.github.com> Date: Tue, 19 Mar 2024 20:33:09 -0700 Subject: [PATCH] Update build-template.yml --- .github/workflows/build-template.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 5c74026a5..4122eb6c8 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -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 @@ -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