mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2025-09-03 15:35:45 -06: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
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Run a one-line script
|
||||
run: echo Hello, world!
|
||||
|
||||
# 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.
|
||||
- name: shell check
|
||||
run: docker-compose run --rm shellcheck ./validate.sh
|
||||
|
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…
x
Reference in New Issue
Block a user