Check for TUF expirations 2x daily, and warn 4 days in advance rather than 2 (#23039)

This commit is contained in:
Ian Littman
2024-10-23 10:06:03 -05:00
committed by GitHub
parent 3e29f16f53
commit 921d8c8afd
+2 -2
View File
@@ -6,7 +6,7 @@ on:
- '.github/workflows/check-tuf-timestamps.yml'
workflow_dispatch: # Manual
schedule:
- cron: '0 10 * * *'
- cron: '0 10,22 * * *'
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
@@ -38,7 +38,7 @@ jobs:
run: |
expires=$(curl -s http://tuf.fleetctl.com/timestamp.json | jq -r '.signed.expires' | cut -c 1-10)
today=$(date "+%Y-%m-%d")
warning_at=$(date -d "$today + 2 day" "+%Y-%m-%d")
warning_at=$(date -d "$today + 4 day" "+%Y-%m-%d")
expires_sec=$(date -d "$expires" "+%s")
warning_at_sec=$(date -d "$warning_at" "+%s")