Skip to content

Commit 641d42a

Browse files
committed
Set build timestamp for reproducible builds
1 parent 5f81162 commit 641d42a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ jobs:
6969
- uses: actions/checkout@v4
7070
- name: Coursier cache
7171
uses: coursier/cache-action@v6
72+
- uses: taiki-e/install-action@parse-changelog
73+
- name: Set build timestamp
74+
run: echo "SOURCE_DATE_EPOCH=$(date -d $(parse-changelog CHANGELOG.md -t | rev | cut -d' ' -f1 | rev) '+%s')" >> "$GITHUB_ENV"
7275
- uses: coursier/setup-action@v1
7376
with:
7477
jvm: adopt:8

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- name: Coursier cache
2121
uses: coursier/cache-action@v6
22+
- uses: taiki-e/install-action@parse-changelog
23+
- name: Set build timestamp
24+
run: echo "SOURCE_DATE_EPOCH=$(date -d $(parse-changelog CHANGELOG.md -t | rev | cut -d' ' -f1 | rev) '+%s')" >> "$GITHUB_ENV"
2225
- uses: coursier/setup-action@v1
2326
with:
2427
jvm: adopt:8

0 commit comments

Comments
 (0)