Skip to content

Update Solutions (The Mini) #21

Update Solutions (The Mini)

Update Solutions (The Mini) #21

Workflow file for this run

name: Update Solutions (The Mini)
on:
schedule:
- cron: '0 3 * * 1-6' # Triggers at 10 p.m. EST the previous day (3 a.m. UTC)
- cron: '0 23 * * 6' # Triggers at 6 p.m. EST on Saturday (11 p.m. UTC)
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update Solutions
run: python update_solutions.py mini
- name: Commit and push if it changed
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add ./solutions/mini_solutions.json
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update solutions"
git push
fi