diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..cb718af --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,35 @@ +name: Lint Check + +on: + # pull_request: + # branches: + # - '**' + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + - name: Install dependencies + run: yarn install + + - name: Run lint + run: yarn lint + + - name: Check for changes + run: | + if [[ $(git status --porcelain) ]]; then + echo "Linting caused changes, failing the build." + exit 1 + else + echo "No changes detected." + fi