feat: switch Helm chart publishing from OCI registry to GitHub Pages

Replaces OCI push (oci://ghcr.io/cpfarhood/charts) with GitHub Pages
Helm repository at https://cpfarhood.github.io/devcontainer. The release
workflow now packages the chart, maintains an index.yaml on the gh-pages
branch, and auto-creates the branch on first run.

Usage: helm repo add devcontainer https://cpfarhood.github.io/devcontainer

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
DevContainer User
2026-02-25 13:34:56 +00:00
parent 3e46bf5ec1
commit 38e481484e
+50 -6
View File
@@ -107,13 +107,55 @@ jobs:
cache-to: type=gha,mode=max
platforms: linux/amd64
- name: Package Helm Chart
- name: Package and Publish Helm Chart to GitHub Pages
run: |
helm registry login ghcr.io \
--username ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }}
# Package the chart
helm package chart/
helm push devcontainer-${{ steps.version.outputs.version }}.tgz oci://ghcr.io/cpfarhood/charts
# Checkout or create gh-pages branch in a temporary directory
git worktree add /tmp/gh-pages gh-pages 2>/dev/null || {
git worktree add --detach /tmp/gh-pages
cd /tmp/gh-pages
git checkout --orphan gh-pages
git rm -rf . 2>/dev/null || true
cat > index.html <<'HTMLEOF'
<!DOCTYPE html>
<html>
<head><title>Dev Container Helm Chart Repository</title></head>
<body>
<h1>Dev Container Helm Chart Repository</h1>
<p>Add this repository to Helm:</p>
<pre>helm repo add devcontainer https://cpfarhood.github.io/devcontainer</pre>
<p>Install the chart:</p>
<pre>helm install mydev devcontainer/devcontainer --set name=mydev</pre>
</body>
</html>
HTMLEOF
git add index.html
git commit -m "Initialize gh-pages branch"
git push origin gh-pages
cd -
}
# Copy packaged chart to gh-pages worktree
cp devcontainer-${{ steps.version.outputs.version }}.tgz /tmp/gh-pages/
# Update Helm repo index
cd /tmp/gh-pages
if [ -f index.yaml ]; then
helm repo index . --url https://cpfarhood.github.io/devcontainer --merge index.yaml
else
helm repo index . --url https://cpfarhood.github.io/devcontainer
fi
# Commit and push
git add index.yaml *.tgz index.html 2>/dev/null || true
git commit -m "Publish chart ${{ steps.version.outputs.version }}"
git push origin gh-pages
cd -
# Clean up worktree
git worktree remove /tmp/gh-pages
- name: Generate Release Notes
id: notes
@@ -139,7 +181,9 @@ jobs:
### Helm Chart
\`\`\`bash
helm install devcontainer oci://ghcr.io/cpfarhood/charts/devcontainer --version ${{ steps.version.outputs.version }}
helm repo add devcontainer https://cpfarhood.github.io/devcontainer
helm repo update
helm install mydev devcontainer/devcontainer --version ${{ steps.version.outputs.version }} --set name=mydev
\`\`\`
EOF