Weekly Sync DB #5
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: 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' |