Skip to content

Commit

Permalink
fix: allow specifying snapshot date
Browse files Browse the repository at this point in the history
Closes: #54
Signed-off-by: You-Sheng Yang <[email protected]>
  • Loading branch information
vicamo committed Apr 15, 2024
1 parent 814b2ac commit 9bb1332
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ jobs:
["sid", "loong64", "https://github.com/vicamo/docker-brew-debian/issues/52"],
["bullseye", "arm64", "https://github.com/vicamo/docker-brew-debian/issues/53"]
]'
pin_timestamp='[
["buster", "armel", "2024/04/13 14:49:39"],
["buster", "mips", "2024/04/13 14:49:39"],
["buster", "mips64el", "2024/04/13 14:49:39"],
["buster", "mipsel", "2024/04/13 14:49:39"],
["buster", "ppc64el", "2024/04/13 14:49:39"],
["buster", "s390x", "2024/04/13 14:49:39"]
]'
codenames="$(echo "${FULL_JSON}" |
jq -c -M 'map(select(.codename as $c |
Expand All @@ -91,7 +99,11 @@ jobs:
"known_failure":(. as $arch |
'"${known_failures}"' |
map(select((.[0] == $s.codename) and (.[1] == $arch)) | .[2]) |
join(",")),
first),
"timestamp":(. as $arch |
'"${pin_timestamp}"' |
map(select((.[0] == $s.codename) and (.[1] == $arch)) | .[2]) |
first),
}) |
tostring)
})')"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/per-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
PLATFORM: ${{ matrix.platform }}
USE_PORTS: ${{ matrix.use_ports && 'true' || 'false' }}
KNOWN_FAILURE: ${{ matrix.known_failure }}
# Use the snapshot from yesterday to preven under sync.
SNAPSHOT_DATE: ${{ matrix.timestamp || 'yesterday' }}
steps:
- # Add support for more platforms with QEMU (optional)
name: Set up QEMU
Expand Down Expand Up @@ -92,8 +94,7 @@ jobs:
# Allow building debian experimental
echo "RUN ln -s sid /usr/share/debootstrap/scripts/experimental" >> Dockerfile
# Use the snapshot from yesterday to preven under sync.
epoch="$(TZ=UTC date --date yesterday +%s)"
epoch="$(TZ=UTC date --date "${SNAPSHOT_DATE}" +%s)"
serial="$(TZ=UTC date --date "@$epoch" +%Y%m%d)"
mkdir output
Expand Down

0 comments on commit 9bb1332

Please sign in to comment.