telegram-crawler/.github/workflows/make_and_send_alert.yml

38 lines
829 B
YAML
Raw Normal View History

2021-04-25 17:05:57 +02:00
name: Send alert to Telegram channel
on:
push:
branches:
2021-04-25 17:14:54 +02:00
- '**'
2021-04-25 17:05:57 +02:00
jobs:
make_and_send_alert:
name: Send alert
runs-on: macos-10.15
steps:
- name: Clone.
uses: actions/checkout@v2
with:
token: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
persist-credentials: false
2021-04-25 17:05:57 +02:00
submodules: recursive
- name: Setup Python.
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies.
run: |
pip install -r requirements.txt
- name: Send alert to Telegram channel.
if: github.actor == 'github-action'
env:
COMMIT_SHA: ${{ github.sha }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
run: |
python make_and_send_alert.py