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
32
.github/workflows/update-sh.yml
vendored
32
.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: ./update.sh
|
||||||
|
- name: Commit files
|
||||||
run: |
|
run: |
|
||||||
hash_before="$(git write-tree)"
|
git config --local user.email "workflow@github.com"
|
||||||
./update.sh
|
git config --local user.name "GitHub Workflow"
|
||||||
git add -A
|
git add ./*
|
||||||
[[ "$hash_before" = "$(git write-tree)" ]]
|
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