Skip to content

Commit f61ccda

Browse files
committed
chore: update ci
1 parent 26fe7ea commit f61ccda

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/upstream-sync.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
with:
1818
fetch-depth: 0 # Get full history for commit count
1919
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
20+
ref: master
2021

2122
- name: Configure Git
2223
run: |
@@ -40,7 +41,6 @@ jobs:
4041
env:
4142
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
4243
run: |
43-
git checkout master
4444
LATEST_RELEASE=$(curl -s https://api.github.com/repos/ggml-org/llama.cpp/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')
4545
4646
if [ -z "$LATEST_RELEASE" ]; then
@@ -49,21 +49,22 @@ jobs:
4949
fi
5050
5151
git reset --hard $LATEST_RELEASE
52-
git push origin master --force
52+
git push origin HEAD:master --force
5353
5454
- name: Rebase dev onto master
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
5757
run: |
58-
git checkout dev
58+
git checkout -b temp-dev origin/dev
5959
echo "Attempting to rebase dev onto master..."
60-
if ! git rebase master; then
60+
# Use the HEAD reference since we're currently on master branch
61+
if ! git rebase HEAD; then
6162
echo "⚠️ Rebase conflict detected, aborting"
6263
git rebase --abort
6364
exit 1
6465
fi
6566
echo "Rebase successful, force pushing to dev..."
66-
git push origin dev --force-with-lease
67+
git push origin HEAD:dev --force-with-lease
6768
6869
- name: Create version tag
6970
env:
@@ -78,7 +79,7 @@ jobs:
7879
if git rev-parse "$NEW_TAG" >/dev/null 2>&1; then
7980
echo "Tag $NEW_TAG already exists, skipping tag creation"
8081
else
81-
git checkout dev
82+
git checkout -b temp-dev origin/dev
8283
git tag "$NEW_TAG"
8384
git push origin tag "$NEW_TAG"
8485
fi

0 commit comments

Comments
 (0)