Refresh API JSON files #117
This file contains 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: Refresh API JSON files | |
on: | |
schedule: | |
# Each day at 5:00PM | |
- cron: '0 17 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
updater: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ✨ | |
uses: actions/[email protected] | |
with: | |
node-version: "lts/*" | |
- name: 💻 Install npm packages | |
run: npm install better-sqlite3 --no-save | |
- name: 🤖 Do the thing | |
run: npm run generate-api-json-files | |
- name: 💅 Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: "[auto-updater] Updated JSON files" | |
body: | | |
This is an automated update of JSON files based on the latest data in the database. | |
Updated files: | |
- backlog.json | |
- games.json | |
- series.json | |
- tests.json | |
- platforms.json | |
- genres.json | |
- planning.json | |
- stats.json | |
- past-planning.json | |
- dlcs.json | |
- identifiers.json | |
draft: false |