Check for TUF expirations 2x daily, and warn 4 days in advance rather than 2 (#23039)
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user