Prettier workflow #4
Workflow file for this run
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: Prettier & Lint | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
branches: main | |
env: | |
NODE_VERSION: "18.13.0" | |
jobs: | |
lint: | |
name: Run code formatter & linter | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install | |
run: npm install | |
- name: Prettier | |
run: npx prettier . --write | |
- name: Commit | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name Shea Dougherty-Gill | |
git commit -a -m "Prettier formatting ${{ vars.IGNORE_DEPLOY }}" | |
git push origin HEAD:${{ github.head_ref }} | |
- name: Lint | |
run: npm run ng lint |