diff --git a/.github/workflows/devcontainer-cache-build.yaml b/.github/workflows/devcontainer-cache-build.yaml index 8a3e01b..37133fb 100644 --- a/.github/workflows/devcontainer-cache-build.yaml +++ b/.github/workflows/devcontainer-cache-build.yaml @@ -42,6 +42,8 @@ jobs: runs-on: ubuntu-24.04 permissions: packages: write + env: + SOURCE_DATE_EPOCH: 1731797200 steps: - name: Checkout uses: actions/checkout@v5.0.0 @@ -54,6 +56,8 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Rewrite timestamps + run: find . | xargs touch --date="@${SOURCE_DATE_EPOCH}" --no-dereference - name: Build devcontainer cache id: build-devcontainer-cache env: diff --git a/devcontainer-cache-build-initialize.py b/devcontainer-cache-build-initialize.py index 1f8091b..25b3da2 100755 --- a/devcontainer-cache-build-initialize.py +++ b/devcontainer-cache-build-initialize.py @@ -140,6 +140,7 @@ def docker_destinations_to_string(docker_destination_list): { "type": "image", "name": f"{DEVCONTAINER_IMAGE_REF}:{GIT_BRANCH_SANITIZED}", + "rewrite-timestamp": True, "push": DEVCONTAINER_PUSH_IMAGE, } ]