Github action to publish helm chart to docker hub #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Helm Chart | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| publish-helm-chart: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v3 | |
| with: | |
| version: 'latest' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DH_REGISTRY_USERNAME }} | |
| password: ${{ secrets.DH_REGISTRY_TOKEN }} | |
| - name: Extract tag version | |
| id: tag | |
| run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Package Helm chart | |
| run: | | |
| helm package ./charts/clowder --version ${{ steps.tag.outputs.version }} | |
| - name: Push Helm chart to Docker Hub | |
| run: | | |
| helm push clowder-${{ steps.tag.outputs.version }}.tgz oci://registry-1.docker.io/${{ secrets.DH_REGISTRY_USERNAME }} |