LibreTube/.github/workflows/tg-bot.yml

49 lines
1.6 KiB
YAML
Raw Normal View History

2022-06-16 14:33:41 +05:30
name: Telegram Bot
2022-06-12 12:40:04 +05:30
on:
workflow_dispatch:
push:
paths-ignore:
- "README*.md"
- "fastlane/**"
- "assets/**"
- ".github/**/*.md"
jobs:
debug-builds:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
2022-06-18 20:34:35 +05:30
- name: Check for Execution Orders
run: |
cd .github
2022-06-18 20:36:55 +05:30
curl https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }} > commit.json
2022-06-18 20:34:35 +05:30
python checkrun.py
2022-06-18 20:38:40 +05:30
cd ..
2022-06-12 12:40:04 +05:30
2022-09-17 23:28:46 +05:30
- name: Download packages
2022-06-15 20:59:23 +05:30
run: |
2022-09-17 23:37:44 +05:30
cd ~
2022-09-17 23:41:03 +05:30
mv .github/pkg.py .
2022-09-17 23:28:46 +05:30
python pkg.py
2022-06-12 12:40:04 +05:30
- name: Telegram Bot
2022-06-18 19:59:29 +05:30
continue-on-error: true
2022-06-12 12:40:04 +05:30
run: |
2022-09-17 23:28:46 +05:30
cd ~
2022-08-13 13:54:05 +05:30
curl https://libre-tube.github.io/images/LibreAlpha.png --output alpha.png
2022-09-17 23:28:46 +05:30
curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/exec --output ~/bot-api
chmod 755 ./bot-api
2022-06-12 12:40:04 +05:30
echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" > tgconfig.py
2022-06-16 14:33:41 +05:30
echo "TG_API_ID = '${{ secrets.TG_API_ID }}'" >> tgconfig.py
2022-06-17 15:32:00 +05:30
echo "TG_POST_ID = '${{ secrets.TG_POST_ID }}'" >> tgconfig.py
2022-06-16 14:33:41 +05:30
echo "TG_API_HASH = '${{ secrets.TG_API_HASH }}'" >> tgconfig.py
2022-06-12 12:40:04 +05:30
python -m pip install --upgrade pip
pip install python-telegram-bot
python tg.py