-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.03 KB
/
update-submodule.yml
File metadata and controls
42 lines (36 loc) · 1.03 KB
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
name: Update notion-sdk-js submodule
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-submodule:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Update submodule to latest
run: |
cd notion-sdk-js
git fetch origin main
git checkout origin/main
- name: Check for changes
id: check
run: |
if git diff --quiet notion-sdk-js; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Commit and push
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add notion-sdk-js
git commit -m "chore: update notion-sdk-js submodule to latest"
git push