Skip to content

Commit d3ec47a

Browse files
committed
build: Use commit timestamp for reproducible builds
1 parent 8c7c6f8 commit d3ec47a

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
@@ -43,7 +43,9 @@ jobs:
4343
- name: Set version output
4444
id: version
4545
run: |
46-
VERSION="${{ matrix.GO_VERSION }}.$(date +%s)"
46+
# Use commit timestamp for reproducible builds
47+
COMMIT_TIMESTAMP="$(git show -s --format=%ct HEAD)"
48+
VERSION="${{ matrix.GO_VERSION }}.${COMMIT_TIMESTAMP}"
4749
echo "version=${VERSION}" >> $GITHUB_OUTPUT
4850
4951
- 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)