Periodic #18
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: Periodic | |
on: | |
schedule: | |
- cron: "0 9 * * 2" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm i | |
- run: npm run prepare | |
- name: Create issue if tests fail | |
env: | |
REPO: ${{ github.repository }} | |
TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
npm t || curl -X "POST" "https://api.github.com/repos/${REPO}/issue" \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
-H "Authorization: Bearer ${TOKEN}" \ | |
-d $'{"title":"Automated check results in tests fail","body":"Run prepare script and update the package","assignees":["omrilotan"],"labels":["good first issue"]}' | |
exit 0 |