mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-06 06:14:57 +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
|
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…
Reference in a new issue