Skip to content

Package mutiple helm charts and push them to your registry

License

Notifications You must be signed in to change notification settings

staysub/helm-push-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helm push action

This action packages one or more helm charts and publish them to your registry

  1. OCI registries : Supported
  2. Chartmuseum : Supported
  3. Should work for pretty much any other registry (if it doesn't, please report as issue)

Usage

workflow.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

name: Basic Build & Push ecs-exporter chart
on: push

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: staysub/helm-push-action@master
        env:
          CHART_DIR_PATH_LIST: 'ecs-exporter'
          REGISTRY_URL: 'https://registry.url'
          REGISTRY_USER: ${{ secrets.REGISTRY_USER }} #NOT required if you helm repo does not need authorization
          REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} #NOT required if you helm repo does not need authorization
name: Build & Push multiple charts in different directories & push all to OCI REGISTRY
on: push

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: staysub/helm-push-action@master
        env:
          CHART_DIR_PATH_LIST: 'parent-dir/sub-dir-with-chart:first-level-dir-with-chart:.dot-dir/my-chart-dir'
          REGISTRY_URL: 'europe-west1-docker.pkg.dev/my-project-id/my-image-registry/' #DO NOT add the oci protocol "oci://"
          REGISTRY_REPO_NAME: 'my-oci-helm-repo'
          OCI_ENABLED_REGISTRY: 'True'  #required for all OCI registries
          REGISTRY_USER: ${{ secrets.REGISTRY_USER }}  #NOT required if you helm repo does not need authorization
          REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} #NOT required if you helm repo does not need authorization

Configuration

The following settings must be passed as environment variables as shown in the example. Sensitive information, especially REGISTRY_USER and REGISTRY_PASSWORD, should be set as encrypted secrets — otherwise, they'll be public to anyone browsing your repository.

Key Value Suggested Type Required
CHART_DIR_PATH_LIST One or more directories paths where Chart.yaml can be found. Paths are seperated by the character : env Yes
REGISTRY_URL Complete registry url. Avoid adding oci:// protocol/prefix env Yes
REGISTRY_REPO_NAME Repo name. If emtpy a generic string will be used env No
REGISTRY_USER Username for registry secret No
REGISTRY_PASSWORD Password for registry secret No
OCI_ENABLED_REGISTRY Set to True if your registry is OCI based like (GCP artifact registry). Defaults is False if not provided. env No
HELM_INSPECT_FLAGS Combination of helm inspect supported flags. https://helm.sh/docs/helm/helm_inspect/ env No
HELM_DEPENDENCY_UPDATE_FLAGS Combination of helm dependency update supported flags. https://helm.sh/docs/helm/dependency_update/ env No
HELM_PACKAGE_FLAGS Combination of helm package supported flags. https://helm.sh/docs/helm/helm_package/ env No
HELM_PUSH_FLAGS Combination of helm push supported flags. https://helm.sh/docs/helm/helm_push/ env No

Action versions

  • master: helm3 v3.11.2

License

This project is distributed under the MIT license.

Releases

No releases published

Packages

No packages published

Languages

  • Shell 74.1%
  • Dockerfile 25.9%