Skip to content

Commit

Permalink
Add prettier to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Feb 4, 2025
1 parent 2a1ba02 commit b729e99
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

0 comments on commit b729e99

Please # to comment.