Skip to content
Merged
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
46 changes: 46 additions & 0 deletions .github/workflows/lint-shell-script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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

# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
permissions:
contents: read

jobs:

lintShellScript:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Remove some files
# These are some code files that fails shell lint and we don't want to modify these
run: rm './braintest_or_ghostpush/tsnef(pessword)/post.sh'

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@2.0.0