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

38 lines
878 B
YAML
Raw Normal View History

2021-04-25 17:53:42 +02:00
name: Send alert to Telegram channel
on:
push:
branches:
- data
jobs:
make_and_send_alert:
name: Send alert
runs-on: macos-12
2021-04-25 17:53:42 +02:00
steps:
- name: Clone.
uses: actions/checkout@v2
- name: Setup Python.
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies.
run: |
git pull
git checkout main
pip install -r requirements.txt
- name: Send alert to Telegram channel.
2021-04-25 18:54:07 +02:00
if: ${{ github.event.head_commit.author.name == 'GitHub Action' }}
2021-04-25 17:53:42 +02:00
env:
COMMIT_SHA: ${{ github.sha }}
2021-04-26 22:28:32 +02:00
GITHUB_PAT: ${{ secrets.PAT_FOR_ALERTS }}
2021-04-25 17:53:42 +02:00
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
2023-06-11 10:41:53 +02:00
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
2021-04-25 17:53:42 +02:00
run: |
python make_and_send_alert.py