Skip to content

Commit 14bad04

Browse files
chore(chart): trigger publish 0.1.9
1 parent 4a882e6 commit 14bad04

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/release-helm-chart-by-branch.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,24 @@ jobs:
119119
else
120120
helm repo index branches/$SAFE --url "https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#*/}/branches/${SAFE}"
121121
fi
122+
# --- Root index dual publish ---
123+
# Maintain a root-level index.yaml so standard repo URL works without branch path.
124+
# Copy new artifact to root and merge index preserving history.
125+
if ls *.tgz >/dev/null 2>&1; then
126+
echo "Moving packaged chart(s) to root for dual publish"
127+
cp dist/*.tgz .
128+
if [ -f index.yaml ]; then
129+
helm repo index . --url "https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#*/}" --merge index.yaml
130+
else
131+
helm repo index . --url "https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#*/}"
132+
fi
133+
git add *.tgz index.yaml
134+
fi
122135
git add branches/$SAFE
123136
if git diff --cached --quiet; then
124137
echo "No changes to commit for branch repository"
125138
else
126-
git commit -m "chore(chart): publish reloader ${{ steps.newver.outputs.version }} for branch $SAFE"
139+
git commit -m "chore(chart): publish reloader ${{ steps.newver.outputs.version }} (branch $SAFE + root index)"
127140
fi
128141
git push origin gh-pages
129142
# Clean working tree to avoid checkout conflicts

0 commit comments

Comments
 (0)