Skip to content

Commit

Permalink
allow conditional trailing spaces check (#56)
Browse files Browse the repository at this point in the history
* allow conditional trailing spaces check

* Update action.yml
  • Loading branch information
Kishan Sairam Adapa authored Jul 30, 2024
1 parent 52a3a84 commit 1da2000
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions validate-charts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'Arguments to be appended to lint and template commands such as "--set global.env=dev"'
required: true
default: ''
check-trailing-spaces:
description: 'Check no trailing spaces in helm template'
required: false
default: 'true'
runs:
using: "composite"
steps:
Expand All @@ -21,6 +25,7 @@ runs:
helm template ${{ inputs.chart-path }} ${{ inputs.extra-args }}
- name: Ensure no Trailing Spaces
if: inputs.check-trailing-spaces == 'true'
shell: bash
run: |
output=$(helm template ${{ inputs.chart-path }} ${{ inputs.extra-args }} | sed -nE '/\S\s+$/p')
Expand Down

0 comments on commit 1da2000

Please sign in to comment.