-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (43 loc) · 1.11 KB
/
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
39
40
41
42
43
44
45
46
name: YouTube
on:
push:
branches:
- main
paths:
- 'data/**'
- 'src/**'
- 'bin/**'
- '.github/workflows/sync.yml'
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
jobs:
sync:
name: Synchronize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up
uses: ./.github/actions/setup
- name: Write secret file
run: |
mkdir -p .data
echo "$GOOGLE_CLIENT_JSON" > .data/google_client_secret.json
env:
GOOGLE_CLIENT_JSON: ${{ secrets.GOOGLE_CLIENT_JSON }}
- name: Synchronize
run: bin/sync --confirm
env:
GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: always()
with:
commit_message: Update state file
commit_user_name: 'creatorsgarten[bot]'
commit_user_email: 'creatorsgarten[bot]@users.noreply.github.com'
- name: Dump the new state
if: always()
run: cat youtube-sync.yml
permissions:
contents: write