about summary refs log tree commit diff
path: root/.github/workflows/lint-json.yml
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-01-05 07:45:21 -0500
committerGitHub <noreply@github.com>2023-01-05 13:45:21 +0100
commita29cd2cdc242de560700f3df7e57b2867f45486e (patch)
treedbc646c837da9b474a31f53612e72c3b829fb5c6 /.github/workflows/lint-json.yml
parent8cff96d94d03b8abbd43c8ac221004d2553b8f15 (diff)
Move Prettier CI checks to filtered jobs (#22376)
Diffstat (limited to '.github/workflows/lint-json.yml')
-rw-r--r--.github/workflows/lint-json.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml
new file mode 100644
index 000000000..5bf4349b3
--- /dev/null
+++ b/.github/workflows/lint-json.yml
@@ -0,0 +1,38 @@
+name: JSON Linting
+on:
+  push:
+    branches-ignore:
+      - 'dependabot/**'
+    paths:
+      - 'package.json'
+      - 'yarn.lock'
+      - '.prettier*'
+      - '**/*.json'
+      - '.github/workflows/lint-json.yml'
+
+  pull_request:
+    paths:
+      - 'package.json'
+      - 'yarn.lock'
+      - '.prettier*'
+      - '**/*.json'
+      - '.github/workflows/lint-json.yml'
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Clone repository
+        uses: actions/checkout@v3
+
+      - name: Set up Node.js
+        uses: actions/setup-node@v3
+        with:
+          cache: yarn
+
+      - name: Install all yarn packages
+        run: yarn --frozen-lockfile
+
+      - name: Prettier
+        run: yarn prettier --check "**/*.json"