Skip to content

Commit

Permalink
chore(actions): added cron job to update submodules (#9)
Browse files Browse the repository at this point in the history
* ci(cron): added cron job to update submodules

* fix(cron): schedule changed to every 5 minutres
  • Loading branch information
roerohan authored Sep 26, 2021
1 parent 6b264e1 commit d2f2e11
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/cron.yml
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 }}

0 comments on commit d2f2e11

Please sign in to comment.