kjimenezr89 pull request #316
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: Code cleanup check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "14" | |
- name: Install dependencies | |
run: npm install glob | |
- name: Run cleanup script | |
run: node cleanup.js | |
- name: Check for uncommitted changes | |
id: git-check | |
run: echo "::set-output name=status::$(git status --porcelain)" | |
- name: Fail if changes are not committed | |
run: echo "::error::There are files to clean, please run `npm install && npm run clean` locally and commit the changes in your pull request" | |
if: steps.git-check.outputs.status != '' |