This repository was archived by the owner on Dec 29, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Sync with Upstream Repository"
2+
3+ on :
4+ schedule :
5+ # Run every hour at the top of the hour
6+ - cron : ' 0 * * * *'
7+ workflow_dispatch :
8+ # Allow manual triggering for testing
9+
10+ permissions :
11+ contents : write
12+
13+ jobs :
14+ sync :
15+ runs-on : ubuntu-latest
16+
17+ # Prevent triggering this job in the upstream repo
18+ if : github.repository != 'meshcloud/meschloud-docs'
19+
20+ steps :
21+ - name : Checkout current repository
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+ token : ${{ secrets.GITHUB_TOKEN }}
26+
27+ - name : Configure Git
28+ run : |
29+ git config user.name "github-actions[bot]"
30+ git config user.email "github-actions[bot]@users.noreply.github.com"
31+
32+ - name : Add upstream remote
33+ run : |
34+ git remote add upstream https://github.com/meshcloud/meshcloud-docs.git
35+ git remote -v
36+
37+ - name : Fetch from upstream
38+ run : |
39+ git fetch upstream
40+
41+ - name : Sync develop branch
42+ run : |
43+ echo "Syncing develop branch..."
44+ git checkout -B develop upstream/develop
45+ git push --force-with-lease origin develop
46+
47+ - name : Sync master branch
48+ run : |
49+ echo "Syncing master branch..."
50+ git checkout -B master upstream/master
51+ git push --force-with-lease origin master
52+
53+ - name : Summary
54+ run : |
55+ echo "✅ Successfully synced both develop and master branches from upstream"
56+ echo "📍 Upstream: https://github.com/meshcloud/meshcloud-docs"
57+ echo "📍 This repo: ${{ github.repository }}"
You can’t perform that action at this time.
0 commit comments