From 6b0d07d70a1ba3ad03fd15b349498bfd26b8dfad Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Thu, 25 Jun 2026 22:03:50 +0530 Subject: [PATCH] ci: Added linting workflow using shellcheck --- .gitea/workflows/lint.yml | 37 +++++++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .gitea/workflows/lint.yml create mode 100644 .github/workflows/lint.yml diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..e4a3f2f --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -0,0 +1,37 @@ +name: Lint + +on: + push: + branches-ignore: + - main + - master + paths-ignore: + - '**.md' + - '.gitignore' + - 'docs/**' + pull_request: + branches: + - master + paths-ignore: + - '**.md' + - '.gitignore' + - 'docs/**' + +jobs: + lint: + runs-on: production + steps: + - name: Install Dependencies + run: | + apt-get update + apt-get install -y git shellcheck + + - name: Checkout Code + run: | + git config --global --add safe.directory '*' + rm -rf * .git || true + git clone --depth 1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git . + + - name: Run ShellCheck + run: | + find . -type f -name '*.sh' | xargs shellcheck diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..20de5f8 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Lint + +on: + push: + branches: + - main + - master + paths-ignore: + - '**.md' + - '.gitignore' + - 'docs/**' + pull_request: + branches: + - main + - master + paths-ignore: + - '**.md' + - '.gitignore' + - 'docs/**' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Run ShellCheck + run: | + sudo apt-get update && sudo apt-get install -y shellcheck + find . -type f -name '*.sh' | xargs shellcheck