mirror of
https://github.com/harivansh-afk/agentikube.git
synced 2026-04-15 06:04:39 +00:00
helm release
This commit is contained in:
parent
44fe1e1f5c
commit
305c77eec9
2 changed files with 84 additions and 66 deletions
45
.github/workflows/release-helm.yml
vendored
Normal file
45
.github/workflows/release-helm.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Release Helm Chart
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
CHART_PATH: chart/agentikube
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Helm
|
||||
uses: azure/setup-helm@v4
|
||||
|
||||
- name: Log in to GHCR
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set chart version
|
||||
run: |
|
||||
sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" ${{ env.CHART_PATH }}/Chart.yaml
|
||||
sed -i "s/^appVersion:.*/appVersion: \"${{ steps.version.outputs.version }}\"/" ${{ env.CHART_PATH }}/Chart.yaml
|
||||
|
||||
- name: Lint
|
||||
run: helm lint ${{ env.CHART_PATH }}/
|
||||
|
||||
- name: Package
|
||||
run: helm package ${{ env.CHART_PATH }}/ --destination .helm-pkg
|
||||
|
||||
- name: Push to GHCR
|
||||
run: helm push .helm-pkg/agentikube-${{ steps.version.outputs.version }}.tgz oci://${{ env.REGISTRY }}/${{ github.repository_owner }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue