diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d72d9fd86e..f428621c87 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -44,6 +44,14 @@ jobs: git tag echo ${{ steps.meta.outputs.tags }} + - name: Get current date and time + id: build_date + run: echo 'BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' >> $GITHUB_ENV + + - name: Get commit sha + id: commit_sha + run: echo "VCS_REF=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + - name: Log into GitHub Container Registry if: github.event_name != 'pull_request' uses: docker/login-action@v2 @@ -59,6 +67,10 @@ jobs: file: ./Dockerfile.slim tags: ${{ steps.meta.outputs.tags }}-slim labels: ${{ steps.meta.outputs.labels }} + build-args: | + VERSION=${{ version }} + BUILD_DATE=${{ env.BUILD_DATE }} + VCS_REF=${{ env.VCS_REF }} - name: Build and push uses: docker/build-push-action@v4