Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/check-outdated-trusted-root.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,9 +4,15 @@ on:
schedule:
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write # This permission is needed to create the issue
steps:
- uses: actions/checkout@v4
- name: Pull new trusted root
Expand All@@ -18,7 +24,7 @@ jobs:
diff resources/trusted-root.jsonl resources/new-trusted-root.jsonl \
&& echo "Trusted root cert has not changed, no action required." \
|| ( \
(gh issue list | grep -i "Trusted root needs updating") \
(gh issue list --label "trusted-root-update" | grep -i "Trusted root needs updating") \
&& echo "Issue to update trusted root already exists, no action required." \
|| gh issue create --title "Trusted root needs updating" --body "The trusted root certificate file needs updating. Use the \`gh attestation trusted-root > resources/trusted-root.jsonl\` command to update it." --assignee "asgrim" \
|| gh issue create --title "Trusted root needs updating" --body "The trusted root certificate file needs updating. Use the \`gh attestation trusted-root > resources/trusted-root.jsonl\` command to update it." --assignee "asgrim" --label "trusted-root-update" \
)