Skip to content

essentialkaos/shellcheck-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Action for checking scripts with Shellcheck.

Usage

Create file .github/workflows/shellcheck.yml.

Add next code to it:

name: CI

on:
  push:
    branches: [master, develop]
  pull_request:
    branches: [master]

jobs:
  Shellcheck:
    name: Shellcheck
    runs-on: ubuntu-latest

    steps:
      - name: Code checkout
        uses: actions/checkout@v3

      - name: Check scripts with Shellcheck
        uses: essentialkaos/shellcheck-action@v1
        with:
          files: src/script1.sh src/script2.sh
          severity: error
          format: gcc
          shell: dash

You can disable specific checks through environment variables:

      - name: Check scripts with Shellcheck
        uses: essentialkaos/shellcheck-action@v1
        env:
          SHELLCHECK_OPTS: -e SC1117 -e SC2034 -e SC2154
        with:
          files: src/script1.sh src/script2.sh

Options

Option Description Value
files List of scripts for checking Paths
version Version of Shellcheck Version in semver notation
severity Minimum severity of errors to consider Severity
format The output format for the results checkstyle
diff
gcc
json
json1
quiet
tty
shell Script dialect sh
bash
dash
ksh

License

Apache License, Version 2.0