From e0fa0a117d26578f746f75b381b1a39250676e4a Mon Sep 17 00:00:00 2001 From: "Il'ya (Marshal)" Date: Sun, 25 Apr 2021 17:53:42 +0200 Subject: [PATCH] good job github... --- .github/workflows/make_and_send_alert.yml | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/make_and_send_alert.yml diff --git a/.github/workflows/make_and_send_alert.yml b/.github/workflows/make_and_send_alert.yml new file mode 100644 index 0000000000..7fac1399e4 --- /dev/null +++ b/.github/workflows/make_and_send_alert.yml @@ -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