File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync Docs Fork with Upstream
2+
3+ on :
4+ schedule :
5+ # Daily at midnight (UTC).
6+ - cron : ' 0 0 * * *'
7+ workflow_dispatch : # Allow manual trigger from the GitHub UI.
8+
9+ jobs :
10+ sync :
11+ runs-on : ubuntu-latest
12+
13+ env :
14+ DEFAULT_BRANCH : development
15+ UPSTREAM_REPO_URL : https://github.com/mendix/docs.git
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+ ref : ${{ env.DEFAULT_BRANCH }}
23+
24+ - name : Configure Git
25+ run : |
26+ git config user.name "github-actions[bot]"
27+ git config user.email "github-actions[bot]@users.noreply.github.com"
28+
29+ - name : Add upstream remote and fetch
30+ run : |
31+ git remote add upstream ${{ env.UPSTREAM_REPO_URL }}
32+ git fetch upstream
33+
34+ - name : Merge upstream changes into default branch
35+ run : |
36+ git checkout ${{ env.DEFAULT_BRANCH }}
37+ git merge upstream/${{ env.DEFAULT_BRANCH }} --no-edit
38+ git push origin ${{ env.DEFAULT_BRANCH }}
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments