Skip to content

Commit a55a54a

Browse files
committed
Fix issues in publishing helm chart part
1 parent f548931 commit a55a54a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ jobs:
212212
fi
213213
214214
echo "publishing helm chart in the branch $charts_branch"
215-
if ! git show-ref --quiet "refs/heads/$charts_branch"; then
215+
if ! git ls-remote --exit-code --heads origin "$charts_branch"; then
216216
git checkout --orphan "$charts_branch"
217217
git rm -rf .
218218
@@ -224,10 +224,11 @@ jobs:
224224
git add README.md LICENSE .gitignore
225225
git commit -m "Initial commit for $charts_branch"
226226
else
227+
git checkout .
227228
git checkout "$charts_branch"
228229
fi
229230
230-
mkdir charts
231+
mkdir -p charts
231232
find dist/ -name '*.tgz' -exec tar -xf {} -C charts/ \;
232233
233234
git add charts/**/*

0 commit comments

Comments
 (0)