Run Trello Script #137
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |