Skip to content

Periodic

Periodic #16

Workflow file for this run

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