Skip to content

Commit

Permalink
add check-installed.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Aug 5, 2023
1 parent 5188125 commit 12f42f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
17 changes: 8 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
9 changes: 9 additions & 0 deletions check-installed.sh
Original file line number Diff line number Diff line change
@@ -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::"

0 comments on commit 12f42f5

Please sign in to comment.