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 committed Aug 15, 2023
1 parent c87fa99 commit 6275b54
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 6275b54

Please sign in to comment.