Skip to content

Update default config file location #6

Update default config file location

Update default config file location #6

Workflow file for this run

name: Package helm charts

Check failure on line 1 in .github/workflows/_helm.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/_helm.yml

Invalid workflow file

(Line: 6, Col: 5): Unexpected value ''
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