fix(docker): pass vergen git vars as build args (#21384)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Matthias Seitz
2026-01-24 03:21:43 +01:00
committed by GitHub
parent fb05a0654f
commit eb788cc7cf
3 changed files with 37 additions and 2 deletions

View File

@@ -50,6 +50,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get git info for vergen
id: git
run: |
echo "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT"
echo "describe=$(git describe --always --tags)" >> "$GITHUB_OUTPUT"
echo "dirty=false" >> "$GITHUB_OUTPUT"
- name: Determine build parameters
id: params
run: |
@@ -82,6 +89,10 @@ jobs:
- name: Build and push images
uses: depot/bake-action@v1
env:
VERGEN_GIT_SHA: ${{ steps.git.outputs.sha }}
VERGEN_GIT_DESCRIBE: ${{ steps.git.outputs.describe }}
VERGEN_GIT_DIRTY: ${{ steps.git.outputs.dirty }}
with:
project: ${{ vars.DEPOT_PROJECT_ID }}
files: docker-bake.hcl