diff --git a/GitLab-CI.md b/GitLab-CI.md index e307e54..61e49a2 100644 --- a/GitLab-CI.md +++ b/GitLab-CI.md @@ -6,4 +6,17 @@ test: stage: test script: - shellcheck testScript.sh +``` + +Here is a CI job that will lint all shell scripts in a git repository: + +```yaml +test: + image: koalaman/shellcheck-alpine:latest + stage: test + before_script: + - apk update + - apk add git + script: + - git ls-files --exclude='*.sh' --ignored | xargs shellcheck ``` \ No newline at end of file