2024-08-27 21:25:50 +02:00
|
|
|
name: gitleaks
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
gitleaks:
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Run shellcheck
|
|
|
|
uses: docker://koalaman/shellcheck-alpine:v0.10.0
|
2024-08-27 21:28:35 +02:00
|
|
|
run: |
|
|
|
|
find . -type f -not -path './.git/*' -not -path './collections/*' -exec file {} \; | while IFS= read -r line; do
|
|
|
|
if echo "$line" | grep -q "shell script"; then
|
|
|
|
file_path=$(echo "$line" | awk -F':' '{print $1}')
|
|
|
|
shellcheck "$file_path"
|
|
|
|
fi
|
|
|
|
done
|