From fe6677584ae69136d7a1027f4a5e4b2962a4a0a7 Mon Sep 17 00:00:00 2001 From: Sebastian Florek Date: Fri, 10 Jan 2025 16:18:38 +0100 Subject: [PATCH] add chart release workflow --- .github/configs/cr.yaml | 5 ++++ .github/workflows/chart.yml | 29 +++++++++++++++++++++++ .github/workflows/{lint.yaml => lint.yml} | 0 3 files changed, 34 insertions(+) create mode 100644 .github/configs/cr.yaml create mode 100644 .github/workflows/chart.yml rename .github/workflows/{lint.yaml => lint.yml} (100%) diff --git a/.github/configs/cr.yaml b/.github/configs/cr.yaml new file mode 100644 index 0000000..40bfad6 --- /dev/null +++ b/.github/configs/cr.yaml @@ -0,0 +1,5 @@ +## Reference: https://github.com/helm/chart-releaser/blob/main/pkg/config/config.go#L40-L65 +index-path: "./index.yaml" +release-name-template: "{{ .Name }}-chart-v{{ .Version }}" +generate-release-notes: true +skip-existing: true \ No newline at end of file diff --git a/.github/workflows/chart.yml b/.github/workflows/chart.yml new file mode 100644 index 0000000..eaa712d --- /dev/null +++ b/.github/workflows/chart.yml @@ -0,0 +1,29 @@ +name: Publish Chart + +on: + push: + branches: + - master + +jobs: + publish: + name: Publish Helm Chart + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + 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 + id: release + uses: helm/chart-releaser-action@v1.5.0 + with: + config: "./.github/configs/cr.yaml" + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yml similarity index 100% rename from .github/workflows/lint.yaml rename to .github/workflows/lint.yml