0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2024-12-25 10:36:14 +01:00

Run update.sh on PR and on cron.

Signed-off-by: pierreozoux <pierre@ozoux.net>
This commit is contained in:
pierreozoux 2020-08-25 17:33:10 +02:00 committed by Pierre Ozoux
parent 83b38c57a6
commit 1eb77283c1

View file

@ -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