Skip to content

Example project to demo testing and hosting a chart repository with GitHub Pages and Actions

License

Notifications You must be signed in to change notification settings

YaaraVerner/helm-charts-repo-actions-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Charts Repo Actions Demo

Example project to demo testing and hosting a chart repository with GitHub Pages and Actions.

Actions

Project Status

main supports Helm 3 only, i. e. both v1 and v2 API version charts are installable.

Chart Sources

  • charts/example-v1: Sample chart with API version v1
  • charts/example-v2: Sample chart with API version v2
  • charts/dependencies-v1: Simple chart with API version v1 to test dependencies from an external Charts repo
  • charts/dependencies-v2: Simple chart with API version v2 to test dependencies from an external Charts repo

How-To

You can automatically test and host your own chart repository with GitHub Pages and Actions by following these steps.

Steps

The prerequisites listed in the READMEs for actions above must be complete before the steps below, or your charts' initial versions won't be released.

  1. Use the main branch for all of the below, if you wish to use the Actions workflow files as-is
  2. Copy the .github/workflows files from this project to yours
  3. Add your charts to a parent directory in the project (/charts is most straightforward, as it's the default. To change this see helm/chart-testing > configuration > chart-dirs)
  4. Optional: To list your charts repo publicly on the Helm Hub, see Helm Hub > How To Add Your Helm Charts. Consider also pushing to CNCF Artifact Hub

Results

  • The Lint and Test Charts workflow uses @helm/kind-action GitHub Action to spin up a kind Kubernetes cluster, and @helm/chart-testing-action to lint and test your charts on every Pull Request and push
  • The Release Charts workflow 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 should now be able to add your charts repo with helm repo add <owner> https://<owner>.github.io/<project>

About

Example project to demo testing and hosting a chart repository with GitHub Pages and Actions

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Mustache 100.0%