Skip to content

Commit 5bcf9bc

Browse files
committed
fixed syncing
1 parent ca27c9a commit 5bcf9bc

File tree

1 file changed

+23
-29
lines changed

1 file changed

+23
-29
lines changed

.github/workflows/sync.yml

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
11
name: 'Upstream Sync'
22

33
on:
4+
schedule:
5+
- cron: '0 4 * * 1-5'
6+
workflow_dispatch:
47

5-
workflow_dispatch: # click the button on Github repo!
6-
# inputs:
7-
# UPSTREAM_BRANCH:
8-
# description: "Upstream Branch"
9-
# required: true
10-
# DOWNSTREAM_BRANCH:
11-
# description: "Downstream Branch"
12-
# required: true
138

149
jobs:
1510
sync_latest_from_upstream:
1611
runs-on: ubuntu-latest
17-
name: Sync latest commits from upstream repo
18-
12+
name: Sync latest commits from upstream repo
1913
steps:
2014
- name: Checkout target repo
21-
uses: actions/checkout@v1
15+
uses: actions/checkout@v2
2216
with:
2317
ref: main
2418
token: ${{ secrets.GH_TOKEN }}
25-
path: Manual
26-
- run: |
27-
git config user.name ksuchitra532
28-
git config user.email ksuchitra532@gmail.com
29-
git config --local user.password ${{ secrets.GH_TOKEN }}
30-
git config --global --add safe.directory ${{ github.workspace }}
31-
# - name: Sync and merge upstream repository with your current repository
32-
# uses: dabreadman/sync-upstream-repo@v1.0.0.b
33-
# with:
34-
# # URL of gitHub public upstream repo
35-
# upstream_repo: "https://github.com/YoYoGames/GameMaker-Manual.git"
36-
# # Branch to merge from upstream (defaults to downstream branch)
37-
# upstream_branch: ${{ inputs.UPSTREAM_BRANCH }}
38-
# # Branch to merge into downstream
39-
# downstream_branch: ${{ inputs.DOWNSTREAM_BRANCH }}
40-
# # GitHub Bot token
41-
# token: ${{ secrets.GH_TOKEN }}
42-
- run: ${{ github.workspace }}/sync.sh YoYoGames/GameMaker-Manual-FR YoYoGames/GameMaker-Manual develop
19+
persist-credentials: false
20+
- name: repo-sync-develop
21+
uses: repo-sync/github-sync@v2
22+
with:
23+
source_repo: "https://${{ secrets.GH_TOKEN }}@github.com//YoYoGames/GameMaker-Manual.git"
24+
source_branch: "develop"
25+
destination_branch: "develop"
26+
github_token: ${{ secrets.GH_TOKEN }}
27+
sync_tags: "true"
28+
- name: repo-sync-lts-2022-r1
29+
uses: repo-sync/github-sync@v2
30+
with:
31+
source_repo: "https://${{ secrets.GH_TOKEN }}@github.com//YoYoGames/GameMaker-Manual.git"
32+
source_branch: "lts-2022-r1"
33+
destination_branch: "lts-2022-r1"
34+
github_token: ${{ secrets.GH_TOKEN }}
35+
sync_tags: "true"
36+

0 commit comments

Comments
 (0)