-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 942 Bytes
/
weekly-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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'