common-helm-lib/.gitea/workflows/buildPush.yaml
Jonas Forsberg 0cf4704fd2
Some checks failed
Lint and Test Charts / lint-test (push) Successful in 7s
Lint and Test Charts / package-helm (push) Failing after 17s
.
2024-10-18 14:41:56 +02:00

40 lines
1.1 KiB
YAML

name: Lint and Test Charts
on:
push:
# Pattern matched against refs/tags
tags:
- '**' # Push events to every tag including hierarchical tags like v1.0/beta
jobs:
package-helm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out code
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.14.4
- name: Install prereq
run: |
apt update
apt install yq -y
- name: build helm package
shell: bash
env:
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
REPO_USERNAME: ${{ vars.REPO_USERNAME }}
REPO_HOST: ${{ vars.REPO_HOST }}
run: |
REPO_PATH=$(git rev-parse --show-toplevel)
CHART_NAME=$(yq .version Chart.yaml)
CHART_VERSION=$(yq .version Chart.yaml)
mkdir /tmp/build
cd /tmp/build
helm package $REPO_PATH
helm registry login --username $REPO_USERNAME --password $REPO_PASSWORD $REPO_HOST
helm push ${CHART_NAME}-${CHART_VERSION}.tgz oci://$REPO_HOST/helm