From c311c388f0a673ebad3c07c164ecf25bb0520c3b Mon Sep 17 00:00:00 2001 From: neilcar Date: Thu, 15 Apr 2021 11:02:49 -0400 Subject: [PATCH 1/3] Update action.yml --- action.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index fc0212a..3a8e1ce 100755 --- a/action.yml +++ b/action.yml @@ -7,10 +7,10 @@ inputs: config: description: 'Path to config file' required: false -outputs: - lint-txt: - description: 'Output from linting' - value: ${{ steps.lint.outputs.lint-txt }} + output-file: + description: 'Filename to store output. Default "output/kubelinter.log"' + required: false + default: 'output/kubelinter.log' runs: using: "composite" steps: @@ -22,14 +22,18 @@ runs: curl -s -L -o kube-linter-linux.tar.gz $LOCATION tar -xf kube-linter-linux.tar.gz -C "${GITHUB_WORKSPACE}/" shell: bash - - id: lint + - name: Lint files + id: lint run: | + set +e cd "${GITHUB_WORKSPACE}" + mkdir output if [ -z ${{ inputs.config }} ]; then export CONFIG="" else export CONFIG="--config ${{ inputs.config }}" fi - ./kube-linter $CONFIG lint ${{ inputs.directory }} + ./kube-linter $CONFIG lint ${{ inputs.directory }} 2>&1 | tee ${{ inputs.output-file }} + result_code=${PIPESTATUS[0]} + exit $result_code shell: bash - From e4912ccf10111ed3f2697465dd509e0383b46b72 Mon Sep 17 00:00:00 2001 From: neilcar Date: Thu, 15 Apr 2021 11:10:51 -0400 Subject: [PATCH 2/3] Update action.yml --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3a8e1ce..3bdc97c 100755 --- a/action.yml +++ b/action.yml @@ -8,9 +8,9 @@ inputs: description: 'Path to config file' required: false output-file: - description: 'Filename to store output. Default "output/kubelinter.log"' + description: 'Filename to store output. Default "kubelinter.log"' required: false - default: 'output/kubelinter.log' + default: 'kubelinter.log' runs: using: "composite" steps: From 48df0df6b0a988fc31528b4ef66c68bc5f7ced39 Mon Sep 17 00:00:00 2001 From: neilcar Date: Thu, 15 Apr 2021 11:13:50 -0400 Subject: [PATCH 3/3] Update action.yml --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index 3bdc97c..5e19fb7 100755 --- a/action.yml +++ b/action.yml @@ -27,7 +27,6 @@ runs: run: | set +e cd "${GITHUB_WORKSPACE}" - mkdir output if [ -z ${{ inputs.config }} ]; then export CONFIG="" else