-
Notifications
You must be signed in to change notification settings - Fork 106
43 lines (41 loc) · 1.46 KB
/
helm-chart-package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: helm-chart-package
on:
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
helm-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.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@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ steps.package.outputs.helm_tgz_path}}