httpd/.gitea/workflows/lint.yaml
Michael Grote 79fd167c65
All checks were successful
linter / gitleaks (push) Successful in 3s
linter / hadolint (push) Successful in 3s
linter / shellcheck (push) Successful in 7s
dd
2024-08-27 21:33:46 +02:00

41 lines
1.1 KiB
YAML

name: linter
on:
push:
branches: [ master ]
pull_request:
jobs:
gitleaks:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Gitleaks
uses: docker://zricethezav/gitleaks:v8.18.4
with:
args: detect --no-git --verbose --source ${{ github.workspace }}
hadolint:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run hadolint
uses: docker://pipelinecomponents/hadolint:0.26.4
with:
args: hadolint Dockerfile
shellcheck:
steps:
- name: Run shellcheck # https://gitea.com/gitea/act_runner/issues/189
uses: addnab/docker-run-action@v3
with:
image: koalaman/shellcheck-alpine:v0.10.0
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