Skip to content

Commit

Permalink
Merge pull request #38 from thomasmerz/add_github_action
Browse files Browse the repository at this point in the history
✨ add a fancy GitHub Action for 'shellcheck'
  • Loading branch information
yubiuser authored Jan 31, 2022
2 parents 3752357 + be67b59 commit 890f454
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Shellcheck Lint

on:
push:
branches:
# Run workflow on every push
- '**' # matches every branch

pull_request:
branches:
# Run workflow on every push
- '**' # matches every branch

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Shellcheck Lint

# This job runs on Linux
runs-on: ubuntu-latest

steps:
# Required to access files of this repository
- uses: actions/checkout@v2

# Download Shellcheck and add it to the workflow path
- name: Download Shellcheck
run: |
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv
chmod +x shellcheck-stable/shellcheck
# Verify that Shellcheck can be executed
- name: Check Shellcheck Version
run: |
shellcheck-stable/shellcheck --version
# Run Shellcheck on repository
- name: Run Shellcheck
run: |
set +e
shellcheck-stable/shellcheck --color=always --severity=warning --exclude=SC1090,SC1091 pihole_adlist_tool

0 comments on commit 890f454

Please sign in to comment.