-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (30 loc) · 1.05 KB
/
main.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
name: Run Raffle Bot
on:
workflow_dispatch:
inputs:
topicID:
description: 'The numeric ID from the URL of the post. EG: talk.vanhack.ca/t/raffle-welcome-to-2021/11292/18 the ID is 11292'
required: true
type: number
action:
description: 'print-nice, dump-raw-object, dump-base64-picked-object, post-data-to-topic, post-winners-to-topic, print-raw-data-post, print-raw-winners-post'
required: true
type: string
jobs:
rafflebot-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run RaffleBot
env:
DISCOURSE_API_KEY: ${{ secrets.RAFFLE_API_KEY }}
run: |
python raffle.py ${{ inputs.action }} ${{ inputs.topicID }} --api-username rafflebot