mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2025-01-10 09:09:00 -07:00
feat(shellcheck): add shell check for shell and pipeline
This commit is contained in:
parent
abea078a67
commit
e19896e3a0
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
|
@ -26,11 +26,5 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# Runs a single command using the runners shell
|
# Runs a single command using the runners shell
|
||||||
- name: Run a one-line script
|
- name: shell check
|
||||||
run: echo Hello, world!
|
run: docker-compose run --rm shellcheck ./validate.sh
|
||||||
|
|
||||||
# Runs a set of commands using the runners shell
|
|
||||||
- name: Run a multi-line script
|
|
||||||
run: |
|
|
||||||
echo Add other actions to build,
|
|
||||||
echo test, and deploy your project.
|
|
||||||
|
|
8
docker-compose.yaml
Normal file
8
docker-compose.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
shellcheck:
|
||||||
|
image: koalaman/shellcheck-alpine:latest
|
||||||
|
volumes:
|
||||||
|
- ".:/build"
|
||||||
|
working_dir: /build
|
11
validate.sh
Executable file
11
validate.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -l
|
||||||
|
|
||||||
|
set -euo pipefile
|
||||||
|
|
||||||
|
rc=0
|
||||||
|
for filename in $(find ./* -name '*.sh'); do
|
||||||
|
echo "Validating"
|
||||||
|
shellcheck "${filename}" || exit $?
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $?
|
Loading…
Reference in New Issue
Block a user