diff --git a/.github/workflows/pint-fix.yml b/.github/workflows/code-style-fix.yml similarity index 69% rename from .github/workflows/pint-fix.yml rename to .github/workflows/code-style-fix.yml index 7563200c5d..a65b9dcba8 100644 --- a/.github/workflows/pint-fix.yml +++ b/.github/workflows/code-style-fix.yml @@ -1,15 +1,13 @@ -name: Fix PHP code style issues +name: Fix code style issues on: push: - paths: - - '**.php' permissions: contents: write jobs: - fix-php-code-styling: + fix-code-styling: runs-on: ubuntu-latest if: github.repository_owner == 'statamic' @@ -25,6 +23,15 @@ jobs: with: pintVersion: 1.16.0 + - name: Use Node.js + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Fix formatting with Prettier + run: npm run prettier:format + - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/.github/workflows/pint-lint.yml b/.github/workflows/code-style-lint.yml similarity index 55% rename from .github/workflows/pint-lint.yml rename to .github/workflows/code-style-lint.yml index 732b5ed824..4c3d686119 100644 --- a/.github/workflows/pint-lint.yml +++ b/.github/workflows/code-style-lint.yml @@ -1,12 +1,10 @@ -name: Lint PHP code style issues +name: Lint code style issues on: pull_request: - paths: - - '**.php' jobs: - lint-php-code-styling: + lint-code-styling: runs-on: ubuntu-latest steps: @@ -19,3 +17,12 @@ jobs: testMode: true verboseMode: true pintVersion: 1.16.0 + + - name: Use Node.js + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Check formatting with Prettier + run: npm run prettier:check