Skip to content

Commit 5b24d98

Browse files
authored
Merge pull request #235 from asgrim/create-issue-when-trusted-root-outdated
Create a GH issue when trusted root certs are outdated
2 parents 453a462 + b8273f4 commit 5b24d98

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Check for outdated trusted root certificates"
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Pull new trusted root
13+
run: gh attestation trusted-root > resources/new-trusted-root.jsonl
14+
- name: Create an issue if different
15+
env:
16+
GH_TOKEN: ${{ github.token }}
17+
run: |
18+
diff resources/trusted-root.jsonl resources/new-trusted-root.jsonl \
19+
&& echo "Trusted root cert has not changed, no action required." \
20+
|| ( \
21+
(gh issue list | grep -i "Trusted root needs updating") \
22+
&& echo "Issue to update trusted root already exists, no action required." \
23+
|| 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" \
24+
)

0 commit comments

Comments
 (0)