Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
Add GH action for bashhate and shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
leo8a committed Oct 19, 2023
1 parent 849d132 commit 0c14b1e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/bashate_and_shellcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint Bash Scripts
on:
push:
branches:
- '*'

jobs:
lint:
name: Run Bashate and ShellCheck
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build tool
run: |
make build # Creates the ./bin directory required by shellcheck afterwards
shell: bash

- name: Run ShellCheck
run: |
make shellcheck # Execute the shellcheck target in the Makefile
shell: bash

- name: Run Bashate
run: |
make bashate # Execute the bashate target in the Makefile
shell: bash
2 changes: 1 addition & 1 deletion hack/shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Set the ShellCheck version and binary path
shellcheck_version="v0.7.2"
shellcheck_binary="$(go env GOPATH)/bin/shellcheck"
shellcheck_binary="./bin/shellcheck"


function cleanup {
Expand Down

0 comments on commit 0c14b1e

Please sign in to comment.