-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from CentML/gflarity/helm_chart_release_workflow
add a helm chart release workflow
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |