Check for outdated trusted root certificates #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Check for outdated trusted root certificates" | |
| 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 | |
| run: gh attestation trusted-root > resources/new-trusted-root.jsonl | |
| - name: Create an issue if different | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| diff resources/trusted-root.jsonl resources/new-trusted-root.jsonl \ | |
| && echo "Trusted root cert has not changed, no action required." \ | |
| || ( \ | |
| (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" --label "trusted-root-update" \ | |
| ) |