Regular review #3
This file contains 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: Regular review | |
on: | |
workflow_dispatch: # Allows triggering manually | |
schedule: | |
- cron: '54 12 1 * *' # runs every first of the month at 17:10 UTC (chosen somewhat randomly) | |
permissions: | |
issues: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: cachix/install-nix-action@v26 | |
- uses: actions/checkout@v4 | |
with: | |
path: repo | |
- name: Generate issue body | |
run: repo/scripts/review-body.sh repo ${{ github.repository }} > body | |
env: | |
# This token has read-only admin access to see who has write access to this repo | |
GH_TOKEN: "${{ secrets.OWNERS_VALIDATOR_GITHUB_SECRET }}" | |
- run: | | |
gh api \ | |
--method POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
/repos/${{ github.repository }}/issues \ | |
-f title="[$(date +'%Y %B')] Regular manual review " \ | |
-F body=@body | |
env: | |
# This token has write access to only issues to create one | |
GH_TOKEN: ${{ github.token }} |