From 7606914ded828e7a754b51f4661668fe99b5389c Mon Sep 17 00:00:00 2001 From: Milan Vit Date: Sun, 14 Nov 2021 18:10:08 +0900 Subject: [PATCH] Allow specifying ShellCheck version (#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- README.md | 12 ++++++++++++ action.yaml | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3aeafb1..0bbf660 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,15 @@ Only `tty` and `gcc` produce file annotations via problem matcher, default is `g with: format: tty ``` + +## Run a specific version of Shellcheck + +If running the latest stable version of Shellcheck is not to your liking, you can specify a concrete version of Shellcheck to be used. When specifying a custom version, please use any of the released versions listed in the [Shellcheck repository](https://github.com/koalaman/shellcheck/tags). + +```yaml + ... + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + with: + shellcheck_version: v0.7.0 +``` diff --git a/action.yaml b/action.yaml index 3dd58f3..34d014e 100644 --- a/action.yaml +++ b/action.yaml @@ -30,6 +30,10 @@ inputs: description: "Output format (checkstyle, diff, gcc, json, json1, quiet, tty)" required: false default: "gcc" + shellcheck_version: + description: "Specify a concrete version of ShellCheck to use" + required: false + default: "stable" outputs: files: description: A list of files with issues @@ -60,7 +64,7 @@ runs: osvariant="linux" fi - scversion="stable" + scversion="${{ inputs.shellcheck_version }}" baseurl="https://github.com/koalaman/shellcheck/releases/download" curl -Lso "${{ github.action_path }}/sc.tar.xz" \