Run update.sh on PR and on cron.

Signed-off-by: pierreozoux <pierre@ozoux.net>
pull/1225/head
pierreozoux 6 years ago committed by Pierre Ozoux
parent 83b38c57a6
commit 1eb77283c1

@ -1,22 +1,28 @@
name: update.sh name: update.sh
on: on:
pull_request: push:
branches:
defaults: - master
run: schedule:
shell: 'bash -Eeuo pipefail -x {0}' - cron: '15 0 * * *'
jobs: jobs:
run_update_sh:
check-changes: name: Run update.sh script
name: Check for Changes
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Check for Changes - name: Run update.sh script
run: | run: ./update.sh
hash_before="$(git write-tree)" - name: Commit files
./update.sh run: |
git add -A git config --local user.email "workflow@github.com"
[[ "$hash_before" = "$(git write-tree)" ]] git config --local user.name "GitHub Workflow"
git add ./*
git commit -m "Runs update.sh"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true

Loading…
Cancel
Save