-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(actions): added cron job to update submodules (#9)
* ci(cron): added cron job to update submodules * fix(cron): schedule changed to every 5 minutres
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Update submodules | ||
|
||
on: | ||
schedule: | ||
- cron: "*/5 * * * *" | ||
|
||
jobs: | ||
submodule-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
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 }} |