File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Code Health
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
13+ with :
14+ config : ${{ vars.PERMISSIONS_CONFIG }}
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version-file : package.json
20+ - name : install dependencies
21+ run : |
22+ npm ci
23+ - name : build
24+ run : |
25+ npm run build
26+ - name : Check for uncommitted files
27+ run : |
28+ export FILES=
29+ FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory)
30+ export LINES=
31+ LINES=$(echo "$FILES" | awk 'NF' | wc -l)
32+ if [ "$LINES" -ne 0 ]; then
33+ echo "Detected files that need to be committed:"
34+ echo "${FILES//^/ }"
35+ echo ""
36+ echo "Try running: npm run build"
37+ exit 1
38+ fi
You can’t perform that action at this time.
0 commit comments