Update JSON #72
This file contains hidden or 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: Update JSON | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: '0 1 1/14 * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| pip install pyyaml | |
| - name: Download csv | |
| run: | | |
| python src/download_csv.py | |
| - name: Convert to json | |
| run: | | |
| python src/csv_to_json.py | |
| - name: Commit and Push Changes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --global user.name "${{ github.actor }}" | |
| git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
| git add . | |
| git commit -m 'GitHub Actions: Update JSON' | |
| git push origin ${{ github.ref_name}} | |