Skip to content

Commit ee84223

Browse files
committed
create branch when doesn't exist
1 parent 434268e commit ee84223

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/update-cli-coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ jobs:
100100
gh repo clone kernel/cli /tmp/kernel-cli
101101
cd /tmp/kernel-cli
102102
103-
# Check if the cli-coverage-update branch already exists on remote
104-
if git ls-remote --exit-code --heads origin cli-coverage-update >/dev/null 2>&1; then
103+
# Try to fetch the cli-coverage-update branch from remote
104+
if git fetch origin cli-coverage-update 2>/dev/null; then
105105
echo "Branch cli-coverage-update exists, checking it out..."
106-
git fetch origin cli-coverage-update
107106
git checkout cli-coverage-update
108107
# Merge latest main to keep it up to date
109108
git merge origin/main -m "Merge main into cli-coverage-update" --no-edit || true
110109
else
111-
echo "Branch cli-coverage-update does not exist, will create from main"
110+
echo "Branch cli-coverage-update does not exist, creating from main..."
111+
git checkout -b cli-coverage-update
112112
fi
113113
114114
- name: Get SDK version info

0 commit comments

Comments
 (0)