Skip to content

Weekly Sync DB

Weekly Sync DB #6

Workflow file for this run

name: Weekly Sync DB
on:
schedule:
- cron: '0 0 * * 0' # Runs at 00:00 UTC every Sunday
workflow_dispatch:
jobs:
syncDB:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Use the version of Node.js that your project uses
- name: Install dependencies
run: npm ci
- name: Run sync-db.js
run: node src/utils/sync-db.js
- name: Commit and push if it's necessary
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update shows.json
file_pattern: src/data/shows.json
commit_options: '--no-verify --signoff'