Files
chromebrew/.github/workflows/autocheck.yml
Satadru Pramanik, DO, MPH, MEng faea7097a5 Add token for autocheck workflow. (#10958)
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2024-12-13 21:57:43 +00:00

22 lines
627 B
YAML

---
name: autocheck
on:
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # setting GH_TOKEN for the entire workflow
jobs:
autocheck:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Run required checks if necessary
run: |
for pr in $(gh pr list -s open --author app/github-actions --json number | jq '.[].number')
do
gh pr checks --required $pr || (echo "Flipping pr ${pr} state." ; gh pr close $pr && gh pr reopen $pr)
done