• Stars
    star
    530
  • Rank 83,660 (Top 2 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A GitHub Action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool

chart-releaser Action

A GitHub action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool.

Usage

Pre-requisites

  1. A GitHub repo containing a directory with your Helm charts (default is a folder named /charts, if you want to maintain your charts in a different directory, you must include a charts_dir input in the workflow).
  2. A GitHub branch called gh-pages to store the published charts.
  3. In your repo, go to Settings/Pages. Change the Source Branch to gh-pages.
  4. Create a workflow .yml file in your .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file

Inputs

  • version: The chart-releaser version to use (default: v1.4.1)
  • config: Optional config file for chart-releaser. For more information on the config file, see the documentation
  • charts_dir: The charts directory
  • skip_packaging: This option, when populated, will skip the packaging step. This allows you to do more advanced packaging of your charts (for example, with the helm package command) before this action runs. This action will only handle the indexing and publishing steps.
  • mark_as_latest: When you set this to false, it will mark the created GitHub release not as 'latest'.

Environment variables

  • CR_TOKEN (required): The GitHub token of this repository (${{ secrets.GITHUB_TOKEN }})

For more information on environment variables, see the documentation.

Example Workflow

Create a workflow (eg: .github/workflows/release.yml):

name: Release Charts

on:
  push:
    branches:
      - main

jobs:
  release:
    # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
    # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
    permissions:
      contents: write
    runs-on: ubuntu-latest
    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 "[email protected]"

      - name: Install Helm
        uses: azure/setup-helm@v3

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

This uses @helm/chart-releaser-action to turn your GitHub project into a self-hosted Helm chart repo. It does this – during every push to main – by checking each chart in your project, and whenever there's a new chart version, creates a corresponding GitHub release named for the chart version, adds Helm chart artifacts to the release, and creates or updates an index.yaml file with metadata about those releases, which is then hosted on GitHub Pages. You do not need an index.yaml file in main at all because it is managed in the gh-pages branch.

Example using custom config

workflow.yml:

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

cr.yaml:

owner: myaccount
git-base-url: https://api.github.com/

For options see config-file.

Code of conduct

Participation in the Helm community is governed by the Code of Conduct.

More Repositories

1

helm

The Kubernetes Package Manager
Go
26,750
star
2

charts

⚠️(OBSOLETE) Curated applications for Kubernetes
Go
15,492
star
3

chartmuseum

helm chart repository server
Go
3,484
star
4

monocular

⚠️(OBSOLETE) Search and discovery UI for Helm Chart repositories
Go
1,421
star
5

chart-testing

CLI tool for linting and testing Helm charts
Go
1,355
star
6

helm-mapkubeapis

This is a Helm plugin which map deprecated or removed Kubernetes APIs in a release to supported APIs
Go
857
star
7

chart-releaser

Hosting Helm Charts via GitHub Pages and Releases
Go
652
star
8

helm-classic

⚠️(OBSOLETE) Helm Classic v1
Go
575
star
9

helm-2to3

⚠️(OBSOLETE) This is a Helm v3 plugin which migrates and cleans up Helm v2 configuration and releases in-place to Helm v3
Go
494
star
10

community

Helm community content
413
star
11

kind-action

A GitHub Action for Kubernetes IN Docker - local clusters for testing Kubernetes
Shell
274
star
12

hub

⚠️(OBSOLETE) Former distributed charts search for hub.helm.sh. Now see https://artifacthub.io/
250
star
13

chart-testing-action

A GitHub Action to lint and test Helm charts
Shell
226
star
14

helm-www

The Helm website for docs, blog and project info.
SCSS
195
star
15

charts-classic

⚠️(OBSOLETE) Charts for Helm Classic v1
Shell
140
star
16

charts-repo-actions-demo

Example project to demo testing and hosting a chart repository with GitHub Pages and Actions
Mustache
104
star
17

examples

Helm chart repository for example charts
Smarty
59
star
18

helm-summit-notes

Helm Summit notes from February 2018
25
star
19

acceptance-testing

Acceptance test suite for the Helm client
Shell
24
star
20

prow

⚠️(OBSOLETE) Developer utilities for Helm
20
star
21

rudder-federation

⚠️(OBSOLETE) Federation support as a Tiller plugin
Go
18
star
22

charts-tooling

Tooling to support github.com/helm/charts
Go
10
star
23

pull-sizer

Label pull requests based on the size of their changes
Go
8
star
24

docker-kubectl-helm-az

⚠️(OBSOLETE) Azure CLI Dockerfile with kubectl and Helm
Dockerfile
8
star
25

rudder-appcontroller

⚠️(OBSOLETE) The AppController backend for Tiller
Go
7
star
26

docker-kubectl-helm-aws

⚠️(OBSOLETE) AWS CLI Dockerfile with kubectl and Helm
Dockerfile
7
star
27

get-helm-sh

Azure ARM templates to deploy https://get.helm.sh
5
star
28

homebrew-tap

Homebrew Formulas for Helm Tools
Ruby
5
star
29

specs

Specifications for Helm interfaces including charts and repositories
5
star
30

query-store-quay-logs

Go
4
star
31

repo-audit

Repo Auditing tool - pre-alpha status
Go
4
star
32

github-webhook-dco-labeler

Utility application used by Helm charts to add a label to pulls when DCO passes
Go
4
star
33

charts-check-pr-title

Go
3
star
34

get-helm

⚠️(OBSOLETE) Install script for Helm Classic v1
Shell
2
star