-
Notifications
You must be signed in to change notification settings - Fork 25
39 lines (33 loc) · 1.01 KB
/
package-helm.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
name: Package Helm charts
on:
push:
tags:
- "v*.*.*"
env:
CHARTS_DIR: deployment/helm/
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
uses: azure/[email protected]
- name: Package Helm charts
run: |
find "$CHARTS_DIR" -name values.yaml | xargs -I '{}' \
sed -e s"/pullPolicy:.*/pullPolicy: IfNotPresent/" -i '{}'
helm package --version "$GITHUB_REF_NAME" --app-version "$GITHUB_REF_NAME" "$CHARTS_DIR"/*
find . -name '*.tgz' -print | while read SRC_FILE; do
DEST_FILE=$(echo $SRC_FILE | sed 's/v/helm-chart-v/g')
mv $SRC_FILE $DEST_FILE
done
- name: Upload Helm packages to GitHub releases
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
draft: true
append_body: true
files: nri-*helm-chart*.tgz