Skip to content

Commit 42d5c73

Browse files
committed
chore: get build date from ci runtime
1 parent b9f2708 commit 42d5c73

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/docker-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ jobs:
116116
type=ref,event=branch
117117
type=ref,event=tag
118118
119+
- name: Get build date
120+
id: build-date
121+
run: echo "date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_OUTPUT
122+
119123
- name: Build and push Docker image
120124
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
121125
with:
@@ -126,7 +130,7 @@ jobs:
126130
labels: ${{ steps.meta.outputs.labels }}
127131
build-args: |
128132
CUPRATE_TAG=${{ needs.check-upstream-tag.outputs.cuprate_tag }}
129-
BUILD_DATE=${{ github.event.head_commit.timestamp }}
133+
BUILD_DATE=${{ steps.build-date.outputs.date }}
130134
VCS_REF=${{ github.sha }}
131135
VERSION=${{ needs.check-upstream-tag.outputs.version }}
132136
# Arch-isolated caching to prevent cross-arch cache collisions

0 commit comments

Comments
 (0)