mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-05 22:04:58 +01:00
Run update.sh on PR and on cron.
Signed-off-by: pierreozoux <pierre@ozoux.net>
This commit is contained in:
parent
83b38c57a6
commit
1eb77283c1
1 changed files with 21 additions and 15 deletions
36
.github/workflows/update-sh.yml
vendored
36
.github/workflows/update-sh.yml
vendored
|
@ -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…
Reference in a new issue