From b179025abea3f10a777fcb5417e5be1277e7539d Mon Sep 17 00:00:00 2001 From: Dustin Lactin Date: Wed, 6 Mar 2024 16:42:01 -0700 Subject: [PATCH] fix: move render and diff helm action from a composite action to reusable workflow --- .../workflows/diff-rendered-charts.yml | 15 ++-------- render-and-diff-helm/README.md | 29 ------------------- 2 files changed, 3 insertions(+), 41 deletions(-) rename render-and-diff-helm/action.yml => .github/workflows/diff-rendered-charts.yml (95%) delete mode 100644 render-and-diff-helm/README.md diff --git a/render-and-diff-helm/action.yml b/.github/workflows/diff-rendered-charts.yml similarity index 95% rename from render-and-diff-helm/action.yml rename to .github/workflows/diff-rendered-charts.yml index 196541f..07c5e67 100644 --- a/render-and-diff-helm/action.yml +++ b/.github/workflows/diff-rendered-charts.yml @@ -2,21 +2,12 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. -name: Matrix render and diff helm charts -description: Renders BASE and REF helm charts then posts the diff of the rendered charts as a comment on the pull request - +# Reusable workflow to render and diff helm charts between the head and base ref of a pull request +# A comment is made on the pull request containing the diff output +name: render and diff helm charts on: workflow_call: - inputs: - chart_path: - description: Path filter for helm charts - required: false - type: string - default: '**/k8s/**' - -env: - CHART_PATH: ${{ inputs.chart_path }} jobs: get_changed_helm_charts: diff --git a/render-and-diff-helm/README.md b/render-and-diff-helm/README.md deleted file mode 100644 index dfd9ddf..0000000 --- a/render-and-diff-helm/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Render and diff helm charts - -This action is used to render helm charts on the base and ref branches of a pull request, create a diff between charts that have been modified and then post the diff as a comment on the pull request. - -## Inputs - -### `chart_path` - -The path filter for helm charts in the repository. Default `'**/k8s/**/**'` - -### Example usage -``` -name: render-and-diff-charts - -on: - pull_request: - paths: - - '**/k8s/**/**' - -jobs: - run_helm_chart_diff: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - name: Render and diff modified helm charts - uses: mozilla-it/deploy-actions/deployment-status@v3.9.0 -``` \ No newline at end of file