-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (31 loc) · 927 Bytes
/
run-tg-bot.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: reddit-tg-bot
on:
schedule:
- cron: '*/40 * * * *'
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install asyncpraw python-telegram-bot aiohttp environs
- name: Run script
env:
TOKEN: ${{ secrets.TOKEN }}
CHAT_ID: ${{ secrets.CHAT_ID }}
REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }}
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
REDDIT_USER_AGENT: ${{ secrets.REDDIT_USER_AGENT }}
SUBREDDITS: ${{ secrets.SUBREDDITS }}
SUBREDDITS_COUNT: ${{ secrets.SUBREDDITS_COUNT }}
run: |
set -x
python main.py