-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.52 KB
/
discourse_leaderboard.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Discourse 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:
type: choice
description: 'Log level'
required: false
options:
- info
- debug
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