forked from energywebfoundation/generic-microservices-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
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 energywebfoundation#21 from michalziobro/master
DOI-2304
- Loading branch information
Showing
14 changed files
with
855 additions
and
60 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,24 @@ | ||
name: Lint and validate chart | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
cancel-previous: | ||
name: Cancel Previous Runs | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.9.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
helm-check: | ||
runs-on: ubuntu-latest | ||
needs: [cancel-previous] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: helm-check | ||
uses: igabaydulin/helm-check-action@0.2.0 | ||
env: | ||
CHART_LOCATION: ./ | ||
CHART_VALUES: ./values.yaml |
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,68 @@ | ||
name: 'Release helm chart' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- Chart.yaml | ||
|
||
jobs: | ||
cancel-previous: | ||
name: Cancel Previous Runs | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/cancel-workflow-action@0.11.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
push-tag: | ||
name: Push tag | ||
runs-on: ubuntu-latest | ||
needs: [cancel-previous] | ||
outputs: | ||
chart-version: ${{ steps.chart-version.outputs.CHART_VERSION }} | ||
changelog: ${{ steps.tag_version.outputs.changelog }} | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get Chart Version | ||
id: chart-version | ||
run: | | ||
echo "CHART_VERSION=$(grep "version:" Chart.yaml | awk '{print $2}')" >> $GITHUB_OUTPUT | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v6.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release_branches: master | ||
custom_tag: ${{ steps.chart-version.outputs.CHART_VERSION }} | ||
custom_release_rules: major:major:Major Changes,minor:minor:Minor Changes,chore:patch:Chores | ||
|
||
release: | ||
name: Release helm chart | ||
runs-on: ubuntu-latest | ||
needs: [push-tag] | ||
|
||
steps: | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1.12.0 | ||
with: | ||
tag: ${{ needs.push-tag.outputs.tag }} | ||
name: Release ${{ needs.push-tag.outputs.tag }} | ||
body: ${{ needs.push-tag.outputs.changelog }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Push Helm chart to OCI compatible registry (Github) | ||
uses: bsord/helm-push@v4.2.0 | ||
with: | ||
useOCIRegistry: true | ||
registry-url: oci://ghcr.io/${{ github.repository_owner }} | ||
username: ${{ github.actor }} | ||
access-token: ${{ secrets.GITHUB_TOKEN }} | ||
force: true | ||
chart-folder: ./ |
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,9 @@ | ||
repos: | ||
- repo: https://github.com/norwoodj/helm-docs | ||
rev: v1.11.0 | ||
hooks: | ||
- id: helm-docs | ||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: v0.0.9 | ||
hooks: | ||
- id: helmlint |
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
Oops, something went wrong.