Skip to content

Commit

Permalink
fix(action): add auto update snippets action
Browse files Browse the repository at this point in the history
  • Loading branch information
sQVe committed Mar 7, 2021
1 parent ef29e9d commit 3a2f783
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/auto-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Auto update snippets

on:
schedule:
- cron: '0 0 * * *'

jobs:
update:
name: Update
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
submodules: recursive

- name: Update snippets
run: scripts/update.sh
3 changes: 0 additions & 3 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ get_snippets_sha() {
check_submodules_changes() {
local snippetsSha

git checkout master
git submodule foreach git pull origin master

if [[ $(git status --short | wc -l) -eq 0 ]]; then
echo "Clean working status after pulling all submodules, exiting..."
exit 0
Expand Down

0 comments on commit 3a2f783

Please sign in to comment.