Skip to content

giladneiger is running Discourse Leaderboard πŸš€ #30

giladneiger is running Discourse Leaderboard πŸš€

giladneiger is running Discourse Leaderboard πŸš€ #30

name: Dicsourse Leaderboard
run-name: ${{ github.actor }} is running Discourse Leaderboard πŸš€
on:
workflow_dispatch:
inputs:
from_date:
description: 'Start date from which to quary topics, `YYYY-MM-DD` format (e.g 2023-01-01)'
required: true
default: ''
to_date:
description: 'End date until which to quary topics, `YYYY-MM-DD` format (e.g 2023-04-01)'
required: true
default: ''
logLevel:
description: 'Log level'
required: false
default: 'INFO'
jobs:
leaderBoardArtifact:
env:
DISCOURSE_USER: 'shaked.dotan'
runs-on: ubuntu-latest
# runs-on: python:3.9.16-slim
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run python main.py
run: python main.py --user ${{ env.DISCOURSE_USER }} --token ${{ secrets.DISCOURSE_TOKEN }} --start_date ${{ github.event.inputs.from_date }} --end_date ${{ github.event.inputs.to_date }}
- name: Archive png file
uses: actions/upload-artifact@v3
with:
name: png artifact
path: discourse_leaderboard.png
retention-days: 5