mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-23 05:42:33 +09:00
ci: add shellcheck linter (#37682)
- Adds `make lint-shell`. uses local `shellcheck` if its version matches, otherwise runs the pinned image via docker or podman - `.shellcheckrc` disables the most annoying rules - Fixes findings across existing scripts Fixes: #37648 Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
7
.github/workflows/files-changed.yml
vendored
7
.github/workflows/files-changed.yml
vendored
@@ -25,6 +25,8 @@ on:
|
||||
value: ${{ jobs.detect.outputs.json }}
|
||||
e2e:
|
||||
value: ${{ jobs.detect.outputs.e2e }}
|
||||
shell:
|
||||
value: ${{ jobs.detect.outputs.shell }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -45,6 +47,7 @@ jobs:
|
||||
yaml: ${{ steps.changes.outputs.yaml }}
|
||||
json: ${{ steps.changes.outputs.json }}
|
||||
e2e: ${{ steps.changes.outputs.e2e }}
|
||||
shell: ${{ steps.changes.outputs.shell }}
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
||||
@@ -124,3 +127,7 @@ jobs:
|
||||
- "tests/e2e/**"
|
||||
- "tools/test-e2e.sh"
|
||||
- "playwright.config.ts"
|
||||
|
||||
shell:
|
||||
- "**/*.sh"
|
||||
- ".shellcheckrc"
|
||||
|
||||
3
.github/workflows/pull-compliance.yml
vendored
3
.github/workflows/pull-compliance.yml
vendored
@@ -54,6 +54,9 @@ jobs:
|
||||
- if: needs.files-changed.outputs.actions == 'true'
|
||||
run: make lint-actions
|
||||
|
||||
- if: needs.files-changed.outputs.shell == 'true'
|
||||
run: make lint-shell
|
||||
|
||||
checks-backend:
|
||||
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
||||
needs: files-changed
|
||||
|
||||
Reference in New Issue
Block a user