From 435358265c5210339266ad49737d61c536601b39 Mon Sep 17 00:00:00 2001 From: supahgreg Date: Sun, 5 Oct 2025 01:51:55 +0000 Subject: Provide expected Docker image build args in the Publish workflow. --- .github/workflows/publish.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a4116b0c7..115e49c2a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,6 +44,12 @@ jobs: - name: Check out code uses: actions/checkout@v5 + - name: Get commit timestamp + run: echo "COMMIT_TIMESTAMP=$(git show -s --format=%ci HEAD)" >> $GITHUB_ENV + + - name: Get commit short SHA + run: echo "COMMIT_SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + - name: Log in to Docker Hub uses: docker/login-action@v3 with: @@ -72,6 +78,12 @@ jobs: context: . file: ${{ matrix.image.dockerfile }} platforms: linux/arm64,linux/amd64 + # TODO: clean up build arg and environment variable naming. + build-args: | + CI_COMMIT_BRANCH=${{ github.ref_name }} + CI_COMMIT_SHA=${{ github.sha }} + CI_COMMIT_SHORT_SHA=${{ env.COMMIT_SHORT_SHA }} + CI_COMMIT_TIMESTAMP=${{ env.COMMIT_TIMESTAMP }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} provenance: true -- cgit v1.2.3-54-g00ecf