Skip to content

Commit 8b5397b

Browse files
authored
feat: add workflow_dispatch to publish helm workflow, remove unneeded fetch (#1977)
1 parent 9a3bfc0 commit 8b5397b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/publish-helm.yaml

+7-9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
release:
55
types: [published]
66

7+
workflow_dispatch:
8+
79
jobs:
810
release:
911

@@ -31,21 +33,17 @@ jobs:
3133
mv hack/find_helm_chart_releases_and_create_helm_index.sh ../.tmp/
3234
mv hack/gh-pages.tmpl ../.tmp/
3335
34-
PAGES_BRANCH="gh-pages"
35-
36-
git fetch --all --tags
37-
38-
if git show-ref --verify --quiet refs/heads/$PAGES_BRANCH || git ls-remote --exit-code --heads origin $PAGES_BRANCH; then
36+
if git show-ref --verify --quiet refs/heads/gh-pages || git ls-remote --exit-code --heads origin gh-pages; then
3937
# Branch exists
40-
git checkout $PAGES_BRANCH
41-
echo "Checked out existing branch '$PAGES_BRANCH'"
38+
git checkout gh-pages
39+
echo "Checked out existing branch 'gh-pages'"
4240
else
4341
# Branch does not exist
44-
git symbolic-ref HEAD refs/heads/$PAGES_BRANCH
42+
git symbolic-ref HEAD refs/heads/gh-pages
4543
rm .git/index
4644
git clean -fdx
4745
echo ".tmp/" > .gitignore
48-
echo "Created and checked out new branch '$PAGES_BRANCH'"
46+
echo "Created and checked out new branch 'gh-pages'"
4947
fi
5048
5149
mv ../.tmp ./

0 commit comments

Comments
 (0)