Skip to content

Commit 1aef2ca

Browse files
committed
update github workflow
1 parent ba0e23c commit 1aef2ca

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/master-to-sync.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
with:
1717
fetch-depth: 0 # Fetches all history for all branches
1818

@@ -23,6 +23,11 @@ jobs:
2323
2424
- name: Merge Master into Sync
2525
run: |
26-
git checkout sync
27-
git merge origin/master --no-edit
26+
if git ls-remote --exit-code --heads origin sync >/dev/null 2>&1; then
27+
git fetch origin sync
28+
git checkout -B sync origin/sync
29+
git merge origin/master --no-edit
30+
else
31+
git checkout -B sync origin/master
32+
fi
2833
git push origin sync

.github/workflows/sync-auto-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Create Pull Request
1919
env:

0 commit comments

Comments
 (0)