summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
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