3 Commits

Author SHA1 Message Date
a6f96f67b5 streamelined pipeline
All checks were successful
Package and publish helm chart / package-helm (push) Successful in 16s
2024-11-12 10:46:03 +01:00
5ba9984415 Merge pull request 'lint and only build on main' (#12) from pipeline into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 8s
Reviewed-on: #12
2024-11-12 09:29:56 +00:00
2b2c082b58 lint and only build on main 2024-11-12 10:25:02 +01:00
2 changed files with 9 additions and 33 deletions

View File

@@ -1,26 +0,0 @@
name: Lint and Test Charts
on:
push:
branches:
- main
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.14.4
- name: Lint the helm package
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
helm lint ./

View File

@@ -2,9 +2,7 @@ name: Package and publish helm chart
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
@@ -29,15 +27,19 @@ jobs:
with:
cmd: yq .version Chart.yaml
- name: Run helm lint on all changed charts
shell: bash
run: |
helm dependency build
helm lint .
- name: build helm package
if: gitea.ref == 'refs/heads/main'
shell: bash
env:
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
CHART_NAME: ${{ steps.chart_name.outputs.result }}
CHART_VERSION: ${{ steps.chart_version.outputs.result }}
run: |
REPO_PATH=$(git rev-parse --show-toplevel)
mkdir /tmp/build
cd /tmp/build
helm package $REPO_PATH
helm package .
curl -H "Authorization: token $PACKAGE_TOKEN" -X POST --upload-file ${CHART_NAME}-${CHART_VERSION}.tgz https://git.rre.nu/api/packages/jonas/helm/api/charts