Skip to content

Commit

Permalink
Merge pull request #10 from CentML/gflarity/helm_chart_release_workflow
Browse files Browse the repository at this point in the history
add a helm chart release workflow
  • Loading branch information
gflarity authored Jun 12, 2024
2 parents fbe7497 + c26b9a9 commit 9b55aec
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release_helm_chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release Helm Chart

on:
# Triggers the workflow when Chart.yaml is updated on the main branch
push:
branches:
- main
paths:
- "charts/simple-sidecar/Chart.yaml"

# Allows you to manually trigger the workflow from GitHub's UI
workflow_dispatch:

jobs:
release_helm_chart:
# Permissions required for the job. In this case, write access to the repository contents is needed.
permissions:
contents: write
# Specifies the type of runner that the job will run on. Here, it's the latest version of Ubuntu.
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# Configures Git with the GitHub actor's name and email to make commits and tags
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
# Runs the chart-releaser action which turns 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
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
# GitHub token used by the chart-releaser action
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Customizes the name of the chart release
CR_RELEASE_NAME_TEMPLATE: "simple-sidecar-helm-chart-{{ .Version }}"

0 comments on commit 9b55aec

Please sign in to comment.