Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions .github/workflows/check_shell_script.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
name: Check Shell Script Syntax
name: ShellCheck

on: [push, pull_request]
on: [pull_request]

jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.2.0
- name: Get Diff Action
uses: technote-space/get-diff-action@v1.2.8
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
SUFFIX_FILTER: .sh
- name: Install ShellCheck
run: |
sudo apt-get install shellcheck
if: env.GIT_DIFF
- name: Lint with ShellCheck
run: |
shellcheck --shell=bash -x ${{ env.GIT_DIFF }}
if: env.GIT_DIFF
github_token: ${{ secrets.github_token }}
level: info
fail_on_error: true
shellcheck_flags: '--shell=bash -x'
reporter: github-pr-review
pattern: "*.sh"
25 changes: 25 additions & 0 deletions .github/workflows/check_shell_script_on_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ShellCheck/push

on:
push:
branches:
- master

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.2.0
- name: Get Diff Action
uses: technote-space/get-diff-action@v1.2.8
with:
SUFFIX_FILTER: .sh
- name: Install ShellCheck
run: |
sudo apt-get install shellcheck
if: env.GIT_DIFF
- name: Lint with ShellCheck
run: |
shellcheck --shell=bash -x ${{ env.GIT_DIFF }}
if: env.GIT_DIFF