Skip to content

[夏令营] 中南大学 #804

[夏令营] 中南大学

[夏令营] 中南大学 #804

Workflow file for this run

name: Update JSON on Issue Closed
on:
issues:
types: [closed]
concurrency:
group: update-json-queue
cancel-in-progress: false
jobs:
update-json:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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
- name: Pull changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git pull
- name: Update JSON with issue content
run: |
python scripts/update_json.py
env:
GITHUB_EVENT_PATH: ${{ github.event_path }}
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add data.json
git add camp2025-by-province.json
git commit -m "Update data.json from issue"
git push