Skip to content

Commit 908a45a

Browse files
committed
build: Use commit timestamp for reproducible builds
1 parent f135e1f commit 908a45a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
- name: Set version output
4343
id: version
4444
run: |
45-
VERSION="${{ matrix.GO_VERSION }}.$(date +%s)"
45+
# Use commit timestamp for reproducible builds
46+
COMMIT_TIMESTAMP="$(git show -s --format=%ct HEAD)"
47+
VERSION="${{ matrix.GO_VERSION }}.${COMMIT_TIMESTAMP}"
4648
echo "version=${VERSION}" >> $GITHUB_OUTPUT
4749
4850
- name: Build Boulder container and .deb

tools/container-build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ if [ -z "${GO_VERSION}" ] ; then
1313
fi
1414

1515
COMMIT_ID="$(git rev-parse --short=8 HEAD)"
16-
VERSION="${GO_VERSION}.$(date +%s)"
16+
# Use commit timestamp for reproducible builds
17+
COMMIT_TIMESTAMP="$(git show -s --format=%ct HEAD)"
18+
VERSION="${GO_VERSION}.${COMMIT_TIMESTAMP}"
1719

1820
# Determine what architecture to build for
1921
if [ -n "${DOCKER_DEFAULT_PLATFORM}" ]; then

0 commit comments

Comments
 (0)