-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (69 loc) · 2.94 KB
/
Copy pathsync.yml
File metadata and controls
79 lines (69 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Upstream Sync
on:
schedule:
- cron: '0 4 * * 1-5'
workflow_dispatch:
concurrency:
group: upstream-sync-${{ github.repository }}
cancel-in-progress: false
jobs:
sync_develop:
uses: YoYoGames/GameMaker-Manual/.github/workflows/upstream-sync-reusable.yml@develop
with:
target_branch: develop
upstream_branch: develop
upstream_repo: YoYoGames/GameMaker-Manual
secrets:
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
git --version
# Add upstream remote and fetch
git remote add upstream "https://x-access-token:${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}@github.com/${UPSTREAM}.git"
git remote -v
git fetch upstream
# Merge from upstream/develop with merge strategy to keep translation in case of conflicts
git merge -X ours upstream/develop
# this is dangerous but will essentially remove any files not staged in the merge
# this is useful since the merge strategy `-X ours` will not handle files where
# they have been deleted on only one branch
# Only use this you're sure that the failing merges fall under this category and are acceptable
# git diff --name-only --diff-filter=U | xargs git rm
git show-ref
- name: Push changes to develop
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
branch: ${{ github.ref }}
sync_latest_from_upstream_2026_main:
runs-on: ubuntu-latest
name: Sync latest commits from upstream repo to 2026-main branch
steps:
- name: Checkout target repo
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
persist-credentials: false
- name: Merge from upstream
env:
UPSTREAM: YoYoGames/GameMaker-Manual
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@users.noreply.github.com"
git --version
# Add upstream remote and fetch
git remote add upstream "https://x-access-token:${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}@github.com/${UPSTREAM}.git"
git remote -v
git fetch upstream
# Merge from upstream/develop with merge strategy to keep translation in case of conflicts
git merge -X ours upstream/2026.0.0-main
# this is dangerous but will essentially remove any files not staged in the merge
# this is useful since the merge strategy `-X ours` will not handle files where
# they have been deleted on only one branch
# Only use this you're sure that the failing merges fall under this category and are acceptable
# git diff --name-only --diff-filter=U | xargs git rm
git show-ref
- name: Push changes to 2026_main
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: 2026.0.0-main