Skip to content

cron

cron #1383

Workflow file for this run

name: cron
on:
schedule:
- cron: "0 7 * * *"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker build -t local/carbonara .
- run: docker run -v $(pwd)/test/images:/home/pptruser/app/test/images --rm local/carbonara npm test
- uses: actions/upload-artifact@v2
if: failure()
with:
name: screenshots
path: test/images/
- name: notify
if: failure()
run: |
curl -s https://api.telegram.org/bot$TELEGRAM_TOKEN/sendMessage \
-d parse_mode=markdown \
-d chat_id=$CHAT_ID \
-d text="🚫 [$GITHUB_REPOSITORY](https://github.com/$GITHUB_REPOSITORY/actions/runs/$RUN_ID) cron action was failed" \
> /dev/null
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ secrets.CHAT_ID}}
RUN_ID: ${{ github.run_id }}