Skip to content

Commit e351c77

Browse files
committed
Github action to publish helm chart to docker hub
1 parent 1a7b16b commit e351c77

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/helm-publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish Helm Chart
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish-helm-chart:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Helm
18+
uses: azure/setup-helm@v3
19+
with:
20+
version: 'latest'
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v2
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v2
27+
with:
28+
username: ${{ secrets.DH_REGISTRY_USERNAME }}
29+
password: ${{ secrets.DH_REGISTRY_TOKEN }}
30+
31+
- name: Extract tag version
32+
id: tag
33+
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
34+
35+
- name: Package Helm chart
36+
run: |
37+
helm package ./charts/clowder --version ${{ steps.tag.outputs.version }}
38+
39+
- name: Push Helm chart to Docker Hub
40+
run: |
41+
helm push clowder-${{ steps.tag.outputs.version }}.tgz oci://registry-1.docker.io/${{ secrets.DH_REGISTRY_USERNAME }}

0 commit comments

Comments
 (0)