Skip to content

Refresh API JSON files #51

Refresh API JSON files

Refresh API JSON files #51

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
draft: false