mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
increase TUF expiration warning by one day
hopefully this will get obsolete before we have time to use it, but just in case this increments the warning time to give us more leeway.
This commit is contained in:
parent
dbe8f95692
commit
8dac783c50
6
.github/workflows/check-tuf-timestamps.yml
vendored
6
.github/workflows/check-tuf-timestamps.yml
vendored
@ -38,11 +38,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
expires=$(curl -s http://tuf.fleetctl.com/timestamp.json | jq -r '.signed.expires' | cut -c 1-10)
|
expires=$(curl -s http://tuf.fleetctl.com/timestamp.json | jq -r '.signed.expires' | cut -c 1-10)
|
||||||
today=$(date "+%Y-%m-%d")
|
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")
|
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
|
exit 1
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user