A Github action to diff a Helm chart.
Add the following step to your workflow:
- name: Diff Helm Chart
uses: fivekoalas/diff-helm-chart@v1
id: diff
with:
targetChartPath: ./target/charts
currentChartPath: ./current/charts
valuesPath: ./values.yaml
currentValuesRepo: fivekoalas/diff-helm-chart
targetValuesRepo: fivekoalas/diff-helm-chart # optional, defaults to currentValuesRepo
currentValuesBranch: main # optional, defaults to develop
token: ${{ secrets.GITHUB_TOKEN }} # required PAT for private repos, optional for public repos defaults to GITHUB_TOKEN
targetBranchRegex: 'release-.*' # optional, defaults to 'target: (.*)'
asMarkdown: true # optional, defaults to true
- name: 'Add PR Comment'
uses: mshick/add-pr-comment@v2
if: steps.diff.outputs.changed == 'true'
with:
message: ${{ steps.diff.outputs.diff }}
This code is made available under the MIT license.