5.25.2 #5
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: Release Charts | |
| on: | |
| release: | |
| types: [ published ] | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: master | |
| env: | |
| REPO_NAME: testops | |
| CHART_NAME: testops | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Retrieve and verify version | |
| run: | | |
| CHART_VERSION=$(grep -m 1 '^version:' charts/testops/Chart.yaml | sed 's/version:[[:space:]]*//') | |
| if [ "${{ github.event.release.tag_name }}" != "${CHART_VERSION}" ]; then | |
| echo "Version mismatch: release tag ${{ github.event.release.tag_name }} does not match Chart.yaml version ${CHART_VERSION}" | |
| exit 1 | |
| fi | |
| echo "CHART_VERSION=$CHART_VERSION" >> $GITHUB_ENV | |
| - uses: azure/setup-helm@v4 | |
| with: | |
| version: v3.14.3 | |
| - name: Helm publish | |
| run: | | |
| echo "Packaging chart charts/${{ env.CHART_NAME }}" | |
| helm dependency update charts/${{ env.CHART_NAME }} | |
| helm package charts/${{ env.CHART_NAME }} | |
| echo "Publishing Helm Chart" | |
| curl --fail -u ${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_PASS }} -T ${{ env.CHART_NAME }}-${CHART_VERSION}.tgz https://${{ vars.CHART_REGISTRY }}/artifactory/helm/${{ env.REPO_NAME }}/${{ env.CHART_NAME }}-${CHART_VERSION}.tgz |