Skip to content

Telegram Assistant

Telegram Assistant #4

name: Telegram Assistant
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch: {}
concurrency:
group: telegram-qa
cancel-in-progress: true
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Restore recent news context
uses: actions/cache/restore@v4
with:
path: data/recent_news.json
key: recent-news-${{ runner.os }}-${{ github.run_id }}
restore-keys: |
recent-news-${{ runner.os }}-
recent-news-
- name: Run Telegram Assistant
env:
TELEGRAM_BOT_TOKEN_01: ${{ secrets.TELEGRAM_BOT_TOKEN_01 }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_MODEL: ${{ vars.GEMINI_MODEL }}
run: python src/telegram_assistant.py
- name: Save recent news context
if: always()
uses: actions/cache/save@v4
with:
path: data/recent_news.json
key: recent-news-${{ runner.os }}-${{ github.run_id }}