-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (31 loc) · 1.08 KB
/
review.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 }}