mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-22 23:37:43 +01:00
good job github...
This commit is contained in:
parent
a0397cb1d6
commit
e0fa0a117d
1 changed files with 35 additions and 0 deletions
35
.github/workflows/make_and_send_alert.yml
vendored
Normal file
35
.github/workflows/make_and_send_alert.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Send alert to Telegram channel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- data
|
||||
|
||||
jobs:
|
||||
make_and_send_alert:
|
||||
name: Send alert
|
||||
runs-on: macos-10.15
|
||||
|
||||
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.
|
||||
if: github.actor == 'github-action'
|
||||
env:
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
run: |
|
||||
python make_and_send_alert.py
|
Loading…
Reference in a new issue