ProxmoxVE/.github/workflows/shellcheck.yml
CanbiZ a119a27b4f
Update shellcheck.yml
Check only PR files, because massive (useless) breaks over all scripts
2025-01-01 13:13:19 +01:00

29 lines
583 B
YAML

name: Shellcheck
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: "5 1 * * *"
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changes
run: |
echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.sh$')"
- name: Run ShellCheck
if: steps.changes.outputs.files != ''
run: |
echo "${{ steps.changes.outputs.files }}" | xargs shellcheck