Hotfix/uncontrolled lunch tickets #1
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: React Lint on PR | |
on: | |
pull_request: | |
paths: | |
- "apps/complete_registration/**" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18.17" | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: cd apps/complete_registration && pnpm install | |
- name: Get list of changed files | |
id: getfile | |
run: | | |
echo "Changed files:" | |
files=$(git diff --name-only HEAD^ HEAD | grep 'apps/complete_registration/.*\.\(js\|jsx\|ts\|tsx\)$') | |
echo "$files" | |
echo "FILES=$files" >> $GITHUB_ENV | |
- name: Run ESLint on changed files | |
run: cd apps/complete_registration && pnpm run lint -- ${{ env.FILES }} | |
- name: Run Prettier on changed files | |
run: cd apps/complete_registration && pnpm run prettier-check -- ${{ env.FILES }} |