Update submodules #1215
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: 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 }} |