Skip to content

Cache Data

Cache Data #137830

Workflow file for this run

name: Cache Data
on:
push:
branches:
- main
workflow_dispatch:
jobs:
dumpData:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: "pip"
- working-directory: cache
name: Install dependencies
run: pip install -U pip && pip install -r requirements.txt
- working-directory: cache
name: Dump Data
run: python3 main.py
- working-directory: cache
name: Send Data to Telegram Channel and save in MongoDB
run: |
python3 sendToTelegram.py
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
# TODO: Generate RSS from mongo data
# - working-directory: cache
# name: Generate Rss Feed
# run: python3 rssFeed.py
- name: Commit and Push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout -b cache
git add cache/Data
git commit -m "Auto Dumped Data at $(date)"
git push --set-upstream origin cache -f