From 12f42f547ef2343e4adb264e0452e85d932f8492 Mon Sep 17 00:00:00 2001 From: ICHINOSE Shogo Date: Sat, 5 Aug 2023 20:37:43 +0900 Subject: [PATCH] add check-installed.sh --- action.yml | 17 ++++++++--------- check-installed.sh | 9 +++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100755 check-installed.sh diff --git a/action.yml b/action.yml index 746917d..f687a43 100644 --- a/action.yml +++ b/action.yml @@ -7,19 +7,18 @@ inputs: runs: using: "composite" steps: - - run: $GITHUB_ACTION_PATH/install.sh + - name: install reviewdog + run: | + set -eu + "$GITHUB_ACTION_PATH/install.sh" shell: sh env: REVIEWDOG_VERSION: ${{ inputs.reviewdog_version }} REVIEWDOG_TEMPDIR: ${{ runner.temp }} - - run: | - if ! command -v reviewdog >/dev/null 2>&1; then - echo "reviewdog was not installed" - exit 1 - fi - echo "::group::📖 reviewdog -h" - reviewdog -h 2>&1 || true - echo "::endgroup::" + - name: check reviewdog is successfully installed + run: | + set -eu + "$GITHUB_ACTION_PATH/check-installed.sh" shell: sh # Ref: https://haya14busa.github.io/github-action-brandings/ diff --git a/check-installed.sh b/check-installed.sh new file mode 100755 index 0000000..666dab7 --- /dev/null +++ b/check-installed.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if ! command -v reviewdog >/dev/null 2>&1; then + echo "reviewdog was not installed" + exit 1 +fi +echo "::group::📖 reviewdog -h" +reviewdog -h 2>&1 || true +echo "::endgroup::"