Update default config file location #6
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: Package helm charts | ||
| on: | ||
| workflow_call: | ||
| env: | ||
| jobs: | ||
| package-helm-charts: | ||
| name: Package and Push Helm Chart | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install helm | ||
| uses: Azure/setup-helm@v3 | ||
| # Check that alpha/beta versions have the form X.Y.Z-alpha.A requried by Helm. | ||
| # An early check saves waiting for the entire build before finding a problem. | ||
| - name: Check helm version tag | ||
| if: ${{ github.ref_type == 'tag' }} | ||
| env: | ||
| VERSION: "${{ github.ref_name }}" | ||
| run: | | ||
| if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+((-alpha|-beta|-rc)\.[0-9]+)?$ ]]; then | ||
| echo "Valid version format: '${VERSION}'" | ||
| else | ||
| echo "Invalid version: '${VERSION}'. Expected: 'X.Y.Z' or 'X.Y.Z-beta.1' or 'X.Y.Z-alpha.1'" | ||
| exit 1 | ||
| fi | ||
| - name: login to gcr using helm | ||
| run: | | ||
| echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin | ||
| - name: package chart and push it | ||
| run: | | ||
| helm dependencies update Charts/glazed | ||
| helm package Charts/glazed --version ${GITHUB_REF##*/} --app-version ${GITHUB_REF##*/} -d /tmp/ | ||
| helm push /tmp/glazed-${GITHUB_REF##*/}.tgz oci://ghcr.io/diamondlightsource/charts | ||