Skip to content

CI Test

CI Test #36

name: helm-chart-package
on:
pull_request:
release:
types: [published]
permissions:
contents: write
jobs:
helm-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: v3.8.1
- run: mkdir -p build
- id: package
run: |
helm_output="$(helm package -d build deploy/helm)"
tgz_path="${helm_output##*saved it to: }"
echo "helm chart tgz path: '${tgz_path}'"
[ ! -f "${tgz_path}" ] && echo "failed to find helm chart from 'helm package' stdout" && exit 1
echo "helm_tgz_path=${tgz_path}" >> $GITHUB_OUTPUT
echo "helm_tgz_name=${tgz_path##*/}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ steps.package.outputs.helm_tgz_name}}
path: ${{ steps.package.outputs.helm_tgz_path}}
if-no-files-found: error
- uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ steps.package.outputs.helm_tgz_path}}