mirror of
https://github.com/developersIndia/deviras.git
synced 2024-11-08 13:42:34 +05:30
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: User Flair Usage Stats
|
|
|
|
on:
|
|
schedule:
|
|
# Runs every day at 3:30 PM UTC (9 PM IST)
|
|
- cron: '30 15 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
send_discord_message:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- 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 }}
|
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
run: |
|
|
cd user-flair-usage
|
|
python -m pip install --upgrade pip
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
python main.py |