summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-05 01:51:55 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-05 01:51:55 +0000
commit435358265c5210339266ad49737d61c536601b39 (patch)
tree212263fa2621c8cf1dcccdf6fe3e65e7bc5366d1 /.github
parentcb17b3b95e3bdfd8b886f59689dd11abb70b49f2 (diff)
Provide expected Docker image build args in the Publish workflow.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/publish.yml12
1 files changed, 12 insertions, 0 deletions
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