You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2026/10/10 16:28:10 UTC

(jackrabbit-filevault) 05/05: Automatically sync master branch from upstream repo

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit 4e1fd559c6cd965dac0aaaa8c2be09877b1f1fb2
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sat Oct 10 18:27:55 2026 +0200

    Automatically sync master branch from upstream repo
    
    This closes #53.
---
 .github/workflows/sync-upstream-master.yml | 50 ++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/.github/workflows/sync-upstream-master.yml b/.github/workflows/sync-upstream-master.yml
new file mode 100644
index 00000000..9bff1eda
--- /dev/null
+++ b/.github/workflows/sync-upstream-master.yml
@@ -0,0 +1,50 @@
+name: Sync upstream master
+
+on:
+  schedule:
+    # Twice daily at 00:00 and 12:00 UTC
+    - cron: '0 0,12 * * *'
+  workflow_dispatch:
+
+permissions:
+  contents: write
+
+concurrency:
+  group: sync-upstream-master
+  cancel-in-progress: false
+
+jobs:
+  sync:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          token: ${{ secrets.UPSTREAM_SYNC_TOKEN || github.token }}
+
+      - name: Configure Git author
+        run: |
+          git config user.name "github-actions[bot]"
+          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+
+      - name: Sync upstream master into local master
+        run: |
+          set -euo pipefail
+
+          git remote add upstream https://github.com/apache/jackrabbit-filevault.git || true
+          git fetch upstream master
+
+          git checkout master
+          git pull --ff-only origin master
+
+          # Enforce fast-forward-only synchronization; fail if history diverged.
+          git merge --ff-only upstream/master
+
+          if git diff --quiet origin/master..master; then
+            echo "No changes to push."
+            exit 0
+          fi
+
+          git push origin master