Create a GH issue when trusted root certs are outdated#235
Conversation
| schedule: | ||
| - cron: "0 0 * * *" | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
Missing permissions section: I believe all repositories in the php/* organization are configured with read-only GHA permissions by default. Thus this is unable to create the issue. You'll need:
permissions:
contents: read
issues: write
There was a problem hiding this comment.
Thanks! Good catch, tested it on my own fork, but that doesn't have that restriction I think :) #237
There was a problem hiding this comment.
Quite possible. Organization-owned repositories behave a little differently. You can sync up the permissions here by switching to the second setting:
That would likely be at https://github.com/asgrim/pie/settings/actions
| 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") \ |
There was a problem hiding this comment.
I think this might not work if too many open issues exist. This should not happen in practice, but perhaps you could make this a little smarter by leveraging the filter flags: https://cli.github.com/manual/gh_issue_list
Something: gh issue list --author "github-actions[bot]" might help. Or just create a dedicated label.

Fixes #212