Skip to content

Commit 4ebd4cc

Browse files
ci(helm): publish chart to ghcr oci on release tags
1 parent 8fac5d0 commit 4ebd4cc

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,34 @@ jobs:
4444
labels: ${{ steps.meta.outputs.labels }}
4545
cache-from: type=gha
4646
cache-to: type=gha,mode=max
47+
48+
publish-chart:
49+
name: Package & push Helm chart to GHCR
50+
runs-on: ubuntu-latest
51+
needs: [publish]
52+
if: startsWith(github.ref, 'refs/tags/')
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- uses: azure/setup-helm@v4
57+
58+
- name: Derive chart version
59+
id: version
60+
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
61+
62+
- name: Log in to GHCR (Helm OCI)
63+
run: |
64+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io \
65+
--username "${{ github.actor }}" \
66+
--password-stdin
67+
68+
- name: Package chart
69+
run: |
70+
helm package charts/openconcho \
71+
--version "${{ steps.version.outputs.VERSION }}" \
72+
--app-version "${{ steps.version.outputs.VERSION }}"
73+
74+
- name: Push chart
75+
run: |
76+
helm push "openconcho-${{ steps.version.outputs.VERSION }}.tgz" \
77+
oci://ghcr.io/${{ github.repository_owner }}/charts

0 commit comments

Comments
 (0)