diff --git a/.github/workflows/check-tuf-timestamps.yml b/.github/workflows/check-tuf-timestamps.yml index f5c01ec13..c55de6e2b 100644 --- a/.github/workflows/check-tuf-timestamps.yml +++ b/.github/workflows/check-tuf-timestamps.yml @@ -38,11 +38,11 @@ jobs: run: | expires=$(curl -s http://tuf.fleetctl.com/timestamp.json | jq -r '.signed.expires' | cut -c 1-10) today=$(date "+%Y-%m-%d") - tomorrow=$(date -d "$today + 1 day" "+%Y-%m-%d") + warning_at=$(date -d "$today + 2 day" "+%Y-%m-%d") expires_sec=$(date -d "$expires" "+%s") - tomorrow_sec=$(date -d "$tomorrow" "+%s") + warning_at_sec=$(date -d "$warning_at" "+%s") - if [ "$expires_sec" -le "$tomorrow_sec" ]; then + if [ "$expires_sec" -le "$warning_at_sec" ]; then exit 1 else exit 0