Skip to content

Commit 5f2b077

Browse files
authored
Merge pull request #237 from asgrim/permissions-for-issues
Add permissions for creating issues to trusted root cert check job
2 parents 0fd6125 + 20d3259 commit 5f2b077

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/check-outdated-trusted-root.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
schedule:
55
- cron: "0 0 * * *"
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
check:
912
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
issues: write # This permission is needed to create the issue
1016
steps:
1117
- uses: actions/checkout@v4
1218
- name: Pull new trusted root
@@ -18,7 +24,7 @@ jobs:
1824
diff resources/trusted-root.jsonl resources/new-trusted-root.jsonl \
1925
&& echo "Trusted root cert has not changed, no action required." \
2026
|| ( \
21-
(gh issue list | grep -i "Trusted root needs updating") \
27+
(gh issue list --label "trusted-root-update" | grep -i "Trusted root needs updating") \
2228
&& 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" \
29+
|| 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" \
2430
)

0 commit comments

Comments
 (0)