# Define action name, description, and inputs name: "JS Lint" description: "Lint code with Prettier and eslint" inputs: working-directory: required: false description: "Working directory" default: "." # Define action steps runs: using: "composite" steps: - uses: actions/setup-node@v3 with: node-version: 16.x - run: | yarn shell: bash working-directory: ${{ inputs.working-directory }} - run: | yarn prettier --check . shell: bash working-directory: ${{ inputs.working-directory }} - if: inputs.working-directory == 'packages/dashboard' run: yarn next lint shell: bash working-directory: ${{ inputs.working-directory }} - if: inputs.working-directory == 'packages/dashboard-v2' run: yarn lint shell: bash working-directory: ${{ inputs.working-directory }}