Skip to content

Commit f222183

Browse files
committed
fix origin branch ref
1 parent e4f905c commit f222183

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/sync-branches.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414

1515
- name: Check Main Branch Status
1616
run: |
17-
git fetch origin/main
17+
git fetch origin
1818
local_ref=$(git rev-parse HEAD)
19-
remote_ref=$(git rev-parse origin/main)
19+
remote_ref=$(git rev-parse origin)
2020
if [ "$local_ref" != "$remote_ref" ]; then
2121
echo "HEAD is behind origin/main. Merging..."
22-
git merge origin/main -m "Actions workflow: auto-merge origin/main -> main"
22+
git merge origin -m "Actions workflow: auto-merge origin -> main"
2323
fi
2424
2525
- name: Handle Merge Conflicts
@@ -34,9 +34,9 @@ jobs:
3434
- name: Merge Main into Dev
3535
run: |
3636
git switch dev
37-
git merge origin/main -m "Actions workflow: auto-merge main -> dev"
37+
git merge origin -m "Actions workflow: auto-merge main -> dev"
3838
3939
- name: Merge Main into Test
4040
run: |
4141
git switch test
42-
git merge origin/main -m "Actions workflow: auto-merge main -> test"
42+
git merge origin -m "Actions workflow: auto-merge main -> test"

0 commit comments

Comments
 (0)