From e28331eaa51b6d66a19d065866e57f39a5a69fe2 Mon Sep 17 00:00:00 2001 From: Nikolas De Giorgis Date: Fri, 24 Sep 2021 11:58:14 +0100 Subject: [PATCH 1/3] Add version parameter --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index abd2981..e44dbf9 100755 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: description: 'Filename to store output. Default "kubelinter.log"' required: false default: 'kubelinter.log' + version: + description: 'Version of kube-linter to use. Default "latest"' + required: false + default: 'latest' runs: using: "composite" steps: @@ -25,7 +29,7 @@ runs: Windows) OS=windows ;; *) OS=linux ;; esac - RELEASE_INFO=$(curl --silent --show-error --fail https://api.github.com/repos/stackrox/kube-linter/releases/latest) + RELEASE_INFO=$(curl --silent --show-error --fail https://api.github.com/repos/stackrox/kube-linter/releases/${{ inputs.version }}) RELEASE_NAME=$(echo "${RELEASE_INFO}" | jq --raw-output ".name") LOCATION=$(echo "${RELEASE_INFO}" \ | jq --raw-output ".assets[].browser_download_url" \ From 4a9c77aec6ff6bab3fbe01e6287a4b54357fd0a3 Mon Sep 17 00:00:00 2001 From: Nikolas De Giorgis Date: Fri, 24 Sep 2021 14:09:20 +0100 Subject: [PATCH 2/3] Rename step --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e44dbf9..22ea026 100755 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ inputs: runs: using: "composite" steps: - - name: Download the latest kube-linter + - name: Download kube-linter run: | set -euo pipefail case "${{ runner.os }}" in From 314cdad80c06c4056d72e4359a0c019ab1de6faf Mon Sep 17 00:00:00 2001 From: Viswajith Venugopal Date: Fri, 24 Sep 2021 10:10:59 -0700 Subject: [PATCH 3/3] Fix valid-yaml so it passes --- sample/valid-yaml/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/valid-yaml/deploy.yaml b/sample/valid-yaml/deploy.yaml index e45e24e..8675081 100755 --- a/sample/valid-yaml/deploy.yaml +++ b/sample/valid-yaml/deploy.yaml @@ -21,7 +21,7 @@ spec: spec: serviceAccountName: my-service-account containers: - - image: nginx:latest + - image: nginx:1.20 name: nginx securityContext: runAsNonRoot: true