Skip to content

WiP: unstable Helm charts... #6

WiP: unstable Helm charts...

WiP: unstable Helm charts... #6

Workflow file for this run

name: Package Helm charts
on:
push:
tags:
- "v*.*.*"
branches:
- main
env:
CHARTS_DIR: deployment/helm/
IS_RELEASE: ${{ github.ref == 'refs/heads/main' && 'false' || 'true' }}
jobs:
release:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
uses: azure/[email protected]
- name: Package Release 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 Release Helm Chart Packages to GitHub Release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
draft: true
append_body: true
files: nri-*helm-chart*.tgz
unstable:
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Deep Checkout
uses: actions/checkout@v4
fetch-depth: 0

Check failure on line 53 in .github/workflows/package-helm.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/package-helm.yaml

Invalid workflow file

You have an error in your yaml syntax on line 53
- name: Install Helm
uses: azure/[email protected]
- name: Package Unstable Helm Charts
run: |
majminpatch="$(git describe | sed -E 's/(v[0-9]*\.[0-9]*\.[0-9]*).*$/\1/')"
majmin=${majminpatch%.*}
patch=${majminpatch##*.}
CHART_VERSION="${majmin}.$((patch+1))-unstable"
APP_VERSION=unstable
find "$CHARTS_DIR" -name values.yaml | xargs -I '{}' \
sed -e s"/pullPolicy:.*/pullPolicy: IfNotPresent/" -i '{}'
helm package --version "$CHART_VERSION" --app-version $APP_VERSION "$CHARTS_DIR"/*
find . -name '*.tgz' -print | while read SRC_FILE; do
DEST_FILE=$(echo $SRC_FILE | sed 's/v/helm-chart-v/g')
mv -v $SRC_FILE $DEST_FILE
done