From 3a2f783c7d54cfff4e57e5579dcddf7cfd3bff50 Mon Sep 17 00:00:00 2001 From: Oskar Grunning Date: Sun, 7 Mar 2021 22:52:20 +0100 Subject: [PATCH] fix(action): add auto update snippets action --- .github/workflows/auto-update.yaml | 20 ++++++++++++++++++++ scripts/update.sh | 3 --- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/auto-update.yaml diff --git a/.github/workflows/auto-update.yaml b/.github/workflows/auto-update.yaml new file mode 100644 index 00000000..fb160ccf --- /dev/null +++ b/.github/workflows/auto-update.yaml @@ -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 diff --git a/scripts/update.sh b/scripts/update.sh index f538dc7a..7a24f25e 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -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