[pull] main from kyma-project:main #350
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull-validate-scripts | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/pull-validate-scripts.yaml' | |
- '**/*.sh' | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install shellcheck | |
# Shellcheck should be preinstalled on linux runners | |
# see: https://github.com/koalaman/shellcheck?tab=readme-ov-file#in-your-build-or-test-suites | |
# in case of change this contract in the future, we will install it | |
run: | | |
if ! [ -x "$(command -v shellcheck)" ]; then | |
sudo apt install shellcheck | |
fi | |
# Use find to ensure each file is checked | |
- run: find "." -type f -name "*.sh" -exec "shellcheck" -x {} + | |
env: | |
SHELLCHECK_OPTS: "-e SC2034 -e SC2181 -e SC2155" |