-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (33 loc) · 1.09 KB
/
run_trello_script.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
name: Run Trello Script
on:
schedule:
# This will run at 01:00 UTC every Monday
- cron: '0 1 * * MON'
workflow_dispatch: # This allows manual triggering
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Setup Base URL for Images
run: |
# Construct the base raw URL based on the repository structure
RAW_URL_BASE="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/main/"
echo "RAW_URL_BASE=$RAW_URL_BASE" >> $GITHUB_ENV
- name: Run Trello script
run: python src/main.py
env:
API_KEY: ${{ secrets.API_KEY }}
OAUTH_TOKEN: ${{ secrets.OAUTH_TOKEN }}
RAW_URL_BASE: ${{ env.RAW_URL_BASE }}
TOPICS_JSON_PATH: './config/leetcode75.json'
COMMENT_MD_PATH: './config/comment.md'