mirror of
https://github.com/nextcloud/docker.git
synced 2025-03-15 19:05:09 +01:00
added update_fork workflow, turned off update-sh.yml for pushes to master
This commit is contained in:
parent
7bd3b7b6db
commit
65a548ed98
2 changed files with 44 additions and 5 deletions
10
.github/workflows/update-sh.yml
vendored
10
.github/workflows/update-sh.yml
vendored
|
@ -1,11 +1,11 @@
|
||||||
name: update.sh
|
name: update.sh
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- master
|
# - master
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '15 0 * * *'
|
# - cron: '15 0 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
39
.github/workflows/update_fork.yml
vendored
Normal file
39
.github/workflows/update_fork.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: Sync Fork with Upstream
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "30 23 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Git user
|
||||||
|
run: |
|
||||||
|
git config --global user.name "Dan Mateas"
|
||||||
|
git config --global user.email "dan@green-coding.berlin"
|
||||||
|
|
||||||
|
- name: Add remote repository
|
||||||
|
run: |
|
||||||
|
g
|
||||||
|
git fetch upstream
|
||||||
|
|
||||||
|
- name: Check for updates
|
||||||
|
run: |
|
||||||
|
CHANGES=$(git rev-list HEAD..upstream/master --count)
|
||||||
|
if [ "$CHANGES" -gt 0 ]; then
|
||||||
|
echo "Updating fork..."
|
||||||
|
git checkout master
|
||||||
|
git merge upstream/master
|
||||||
|
git push
|
||||||
|
else
|
||||||
|
echo "No updates from the original repository."
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue