Skip to content

Add a GitHub workflow that checks for uncomitted changes #1

Add a GitHub workflow that checks for uncomitted changes

Add a GitHub workflow that checks for uncomitted changes #1

# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
name: uncomitted-changes
on:
pull_request:
paths:
- .projenrc.ts
types:
- opened
- synchronize
push:
paths:
- .projenrc.ts
branches:
- main
jobs:
uncomitted-changes:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.0.0
- name: Cache node_modules
id: cache-deps
uses: actions/cache@v3
with:
key: ${{ hashFiles('./package-lock.json') }}
path: ./node_modules
- name: Install dependencies
if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }}
run: npm ci
- name: Execute the command
run: npm run default
- name: Check git
run: CHANGES=$(git status --porcelain) && [ -z $CHANGES ] || { echo $CHANGES; exit 1; }