Skip to content

Commit

Permalink
build(ci): Add verification that no script under functions/ directory…
Browse files Browse the repository at this point in the history
… is executable
  • Loading branch information
kpatryk committed Oct 26, 2023
1 parent 2964dce commit e23a85b
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
name: Shellcheck Validation

on:
workflow_dispatch:
push:
branches:
- main
- feature/*
paths-ignore:
- "**/*.md"
push:
branches:
- main
- feature/*
paths-ignore:
- "**/*.md"

jobs:
shellcheck:
uses: kpatryk/workflows/.github/workflows/shellcheck.yml@v0.2.0
with:
os: ubuntu-latest
scandir: functions/
runs-on: ubuntu-latest

steps:
- name: Check Executability of Shell Scripts
run: |
find functions/ -type f -name "*.sh" ! -executable -exec sh -c 'echo "Error: {} is not executable"; exit 1' \;
shellcheck-validation:
needs: shellcheck
runs-on: ubuntu-latest
steps:
- name: Run shellcheck
uses: kpatryk/workflows/.github/workflows/shellcheck.yml@v0.2.0
with:
os: ubuntu-latest
scandir: functions/
# find $FUNCTIONS_DIR -type f -name "*.sh" -exec sh -c ' \
# if [ ! -x "{}" ]; then \
# echo "Error: {} is not executable"; \
# exit 1; \
# fi' \;

0 comments on commit e23a85b

Please sign in to comment.