-
-
Notifications
You must be signed in to change notification settings - Fork 29
44 lines (36 loc) · 1.03 KB
/
cron.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
name: Update submodules
on:
schedule:
- cron: "0 0 * * *"
jobs:
submodule-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: npm install
run: |
npm install
- name: Setup git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update submodules
run: |
git submodule update --remote
- name: Check for build errors
run: |
npm run build:lib
- name: Commit and push
run: |
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "fix(submodules): submodules were updated"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}