Run update.sh on PR and on cron.

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

@ -1,22 +1,28 @@
name: update.sh
on:
pull_request:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
push:
branches:
- master
schedule:
- cron: '15 0 * * *'
jobs:
check-changes:
name: Check for Changes
run_update_sh:
name: Run update.sh script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check for Changes
run: |
hash_before="$(git write-tree)"
./update.sh
git add -A
[[ "$hash_before" = "$(git write-tree)" ]]
- uses: actions/checkout@v2
- name: Run update.sh script
run: ./update.sh
- name: Commit files
run: |
git config --local user.email "workflow@github.com"
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