From b4b3a9885938ef8d312206417eb7c988dcfde6d2 Mon Sep 17 00:00:00 2001 From: Marco Cicala Date: Sun, 9 Apr 2023 11:28:00 +0200 Subject: [PATCH 1/2] Use GITHUB_ACTION_PATH Use GITHUB_ACTION_PATH instead of github.action_path for Docker compliance --- action.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/action.yaml b/action.yaml index 130781e..0171b18 100644 --- a/action.yaml +++ b/action.yaml @@ -70,17 +70,17 @@ runs: baseurl="https://github.com/koalaman/shellcheck/releases/download" - curl -Lso "${{ github.action_path }}/sc.tar.xz" \ + curl -Lso "${GITHUB_ACTION_PATH}/sc.tar.xz" \ "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz" - tar -xf "${{ github.action_path }}/sc.tar.xz" -C "${{ github.action_path }}" - mv "${{ github.action_path }}/shellcheck-${INPUT_VERSION}/shellcheck" \ - "${{ github.action_path }}/shellcheck" + tar -xf "${GITHUB_ACTION_PATH}/sc.tar.xz" -C "${GITHUB_ACTION_PATH}" + mv "${GITHUB_ACTION_PATH}/shellcheck-${INPUT_VERSION}/shellcheck" \ + "${GITHUB_ACTION_PATH}/shellcheck" - name: Display shellcheck version shell: bash run: | - "${{ github.action_path }}/shellcheck" --version + "${GITHUB_ACTION_PATH}/shellcheck" --version - name: Set options shell: bash @@ -204,12 +204,12 @@ runs: -print0) if [[ -n "${INPUT_CHECK_TOGETHER}" ]]; then - "${{ github.action_path }}/shellcheck" \ + "${GITHUB_ACTION_PATH}/shellcheck" \ ${INPUT_SHELLCHECK_OPTIONS} \ "${filepaths[@]}" || statuscode=$? else for file in "${filepaths[@]}"; do - "${{ github.action_path }}/shellcheck" \ + "${GITHUB_ACTION_PATH}/shellcheck" \ ${INPUT_SHELLCHECK_OPTIONS} \ "$file" || statuscode=$? done From a0f877d9dee7a588b94cb0e24626da20fa8d12b3 Mon Sep 17 00:00:00 2001 From: Marco Cicala Date: Sun, 9 Apr 2023 11:42:29 +0200 Subject: [PATCH 2/2] Update README.md Run Spellcheck in self-hosted runner --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 782d8ef..e8c6a80 100644 --- a/README.md +++ b/README.md @@ -166,3 +166,28 @@ If running the latest stable version of Shellcheck is not to your liking, you ca with: version: v0.9.0 ``` + +## Run Spellcheck in self-hosted runner + +To run Spellcheck in self-hosted container, first need to add all OS requirements based on container image used. +(For Rockylinux 8 image, xz and findutils for example) + +```yaml +on: push + +name: "Trigger: Push action" + +jobs: + shellcheck: + name: Shellcheck + runs-on: [self-hosted, rocky] + container: rockylinux:8 + steps: + - uses: actions/checkout@v3 + - name: OS packages + run: | + dnf install xz findutils -y + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + ``` +