ci: ensure builds are reproducible
Change-Id: I62741af7106d410f161708990b309c886ec4a7c6
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index c8ca65c..3ecdfca 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -15,13 +15,16 @@
permissions: {}
+env:
+ SPHINXOPTS: --color
+
jobs:
html:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- - name: Checkout
+ - name: Checkout repository
uses: actions/checkout@v3
- name: Extract version
id: version
@@ -41,9 +44,9 @@
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Generate HTML pages
- run: make html
- env:
- SPHINXOPTS: --color
+ run: |
+ export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
+ make html
- name: Publish HTML pages
uses: actions/upload-artifact@v3
with:
@@ -54,7 +57,7 @@
pdf:
runs-on: ubuntu-latest
steps:
- - name: Checkout
+ - name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
@@ -68,9 +71,9 @@
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Generate PDF document
- run: make latexpdf
- env:
- SPHINXOPTS: --color
+ run: |
+ export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
+ make latexpdf
- name: Publish PDF document
uses: actions/upload-artifact@v3
with: