feat(ci): add workflows for helm chart, move files around

This commit is contained in:
perf3ct 2025-06-18 20:34:09 +00:00
parent 2b27f55080
commit 581ebec5b4
7 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,53 @@
name: pull-request-validation
on:
pull_request:
branches:
- main
- feature/pr-action
jobs:
build_lint_validate_diff:
name: lint, validate and diff from main
permissions: write-all
runs-on: ubuntu-latest
container:
image: alpine/helm:3.14.3
steps:
- name: checkout pr head
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install chart dependencies
run: helm dependency build charts/readur
- name: lint helm chart
run: helm lint charts/readur --set persistence.data.existingClaim=test-pvc
- name: prepare
run: mkdir -p charts/readur/build
- name: create full manifest from pr head
run: helm template readur charts/readur --set persistence.data.existingClaim=test-pvc > charts/readur/build/manifest.yaml
- name: checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
path: main
- name: install chart dependencies
run: helm dependency build main/charts/readur
- name: prepare
run: mkdir -p main/charts/readur/build
- name: create full manifest from main
run: helm template readur main/charts/readur --set persistence.data.existingClaim=test-pvc > main/charts/readur/build/manifest.yaml
- name: create diff comment
uses: int128/diff-action@v1
with:
base: main/charts/readur/build
head: charts/readur/build
comment-header: "## Changes in Final Manifest"

View File

@ -0,0 +1,26 @@
name: release
on:
push:
tags:
- "chart-v*"
jobs:
release:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"