Skip to content

Commit

Permalink
chart-releaser action (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman authored Feb 4, 2025
1 parent bc3f906 commit 997216f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
1 change: 1 addition & 0 deletions .cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release-name-template: chart-{{ .Version }}
41 changes: 28 additions & 13 deletions .github/workflows/chart.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
name: Chart

on:
workflow_dispatch:
push:
tags:
- "chart-*"

env:
GITHUB_TOKEN: ${{ github.token }}

name: Chart
permissions:
contents: write
id-token: write

jobs:
chart-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Package Chart
- name: Check tag
if: github.event_name == 'push'
run: |
make package-chart;
pushed_tag=$(echo ${{ github.ref_name }} | sed "s/chart-//")
chart_tag=$(yq .version charts/k3k/Chart.yaml)
echo pushed_tag=${pushed_tag} chart_tag=${chart_tag}
[ "${pushed_tag}" == "${chart_tag}" ]
- name: Release Chart
run: |
gh release upload ${{ github.ref_name }} deploy/*
- name: Index Chart
- name: Configure Git
run: |
make index-chart
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/[email protected]
with:
config: .cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 997216f

Please sign in to comment.