From 437a58ab5805d1d41b1383d13e7a39f6b11dc6c4 Mon Sep 17 00:00:00 2001 From: Ashish Bhatia Date: Wed, 18 Sep 2024 00:23:18 -0700 Subject: [PATCH] ci: add Shell script linter --- .github/workflows/lint-shell-script.yaml | 36 ++++++++++++++++++++++++ README.md | 1 + 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/lint-shell-script.yaml diff --git a/.github/workflows/lint-shell-script.yaml b/.github/workflows/lint-shell-script.yaml new file mode 100644 index 0000000..7173e85 --- /dev/null +++ b/.github/workflows/lint-shell-script.yaml @@ -0,0 +1,36 @@ +# Generated by Gabo (https://github.com/ashishb/gabo) +--- +# Run this locally with act - https://github.com/nektos/act +# act -j lintShellScript +name: Lint Shell scripts + +on: # yamllint disable-line rule:truthy + push: + branches: [main, master] + paths: + - '**.sh' + - '**.bash' + - '.github/workflows/lint-shell-script.yaml' + pull_request: + branches: [main, master] + paths: + - '**.sh' + - '**.bash' + - '.github/workflows/lint-shell-script.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + lintShellScript: + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@2.0.0 diff --git a/README.md b/README.md index a4bf138..1ce0190 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # macOS and iOS Security Related Tools [![Awesome](https://awesome.re/badge-flat.svg)](https://awesome.re) [![Test](https://github.com/ashishb/osx-and-ios-security-awesome/actions/workflows/test.yaml/badge.svg)](https://github.com/ashishb/osx-and-ios-security-awesome/actions/workflows/test.yaml) +[![Lint Markdown](https://github.com/ashishb/osx-and-ios-security-awesome/actions/workflows/lint-markdown.yaml/badge.svg)](https://github.com/ashishb/osx-and-ios-security-awesome/actions/workflows/lint-markdown.yaml) [![Lint YAML](https://github.com/ashishb/osx-and-ios-security-awesome/actions/workflows/lint-yaml.yaml/badge.svg)](https://github.com/ashishb/osx-and-ios-security-awesome/actions/workflows/lint-yaml.yaml) ## Contents