Skip to content

Build Market Directory #43

Build Market Directory

Build Market Directory #43

Workflow file for this run

name: Build Market Directory
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run build script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/build_market.py
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add data/market-directory.json
# Only commit if there are changes
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: auto-update market-directory.json" && git push)