Update Events JSON #151
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 Events JSON | |
| on: | |
| schedule: | |
| # 0:00 UTC is 9:00 JST, run daily | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-events: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| CONNPASS_API_KEY: ${{ secrets.CONNPASS_API_KEY }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Run update script and validate | |
| run: | | |
| chmod +x scripts/update-events.sh | |
| docker run -v $PWD:/target -e "CONNPASS_API_KEY=$CONNPASS_API_KEY" dwdraju/alpine-curl-jq bash /target/scripts/update-events.sh | |
| jq . src/routes/Event/events.json | |
| - name: Create Pull Request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| commit-message: "chore: update events.json" | |
| branch: "chore-update-events-" | |
| branch-suffix: "timestamp" | |
| delete-branch: true | |
| title: "chore: update events [auto]" | |
| body: | | |
| Update events.json | |
| - Updated with *today's* data | |
| - Auto-generated by [create-pull-request][1] | |
| [1]: https://github.com/peter-evans/create-pull-request | |
| labels: | | |
| events | |
| automated pr | |
| draft: false | |
| base: main |