deviras/.github/workflows/flair-usage-stats.yml

34 lines
1.1 KiB
YAML
Raw Normal View History

2024-01-07 13:09:06 +05:30
name: User Flair Usage Stats
on:
2024-01-07 20:06:12 +05:30
schedule:
# Runs every day at 3:30 PM UTC (9 PM IST)
- cron: '30 15 * * *'
2024-01-07 13:09:06 +05:30
workflow_dispatch:
jobs:
send_discord_message:
runs-on: ubuntu-latest
steps:
2024-01-07 19:52:50 +05:30
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Get Stats
env:
REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }}
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
REDDIT_PASSWORD: ${{ secrets.REDDIT_PASSWORD }}
REDDIT_USERNAME: ${{ secrets.REDDIT_USERNAME }}
2024-01-07 20:03:12 +05:30
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
2024-01-07 19:52:50 +05:30
run: |
cd user-flair-usage
2024-01-07 20:03:12 +05:30
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python main.py