Skip to content

Commit

Permalink
github: Add cron job for refreshing TUF timestamp
Browse files Browse the repository at this point in the history
This will run every hours. It will call a script:

 https://github.com/foundriesio/fioctl/blob/tuf-metadata/refresh-metadata.sh

That will check if the timestamp is expiring in the next 48 hours. If
so, it will update the timestamp for another 7 days.

Signed-off-by: Andy Doan <[email protected]>
  • Loading branch information
doanac authored and detsch committed Sep 22, 2023
1 parent 6f50c78 commit c529ba3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/tuf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Refresh timestamp metadata
on:
schedule:
# every 8 hours
- cron: '0 */8 * * *'
workflow_dispatch:
branches: [ main ]

jobs:
resign:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: tuf-metadata
- name: Setup signing key
env:
TIMESTAMP_JSON: ${{ secrets.TUF_TIMESTAMP_JSON }}
run: |
mkdir keys
echo "$TIMESTAMP_JSON" > keys/timestamp.json
- name: Sign
env:
TUF_TIMESTAMP_PASSPHRASE: ${{ secrets.TUF_TIMESTAMP_PASSPHRASE}}
run: |
./refresh-metadata.sh

0 comments on commit c529ba3

Please sign in to comment.