Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
(ci/github): Update prettier action to lint and commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jcxldn committed Jun 27, 2023
1 parent 8361d8a commit 2dac7d0
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
name: Lint

on: push
on:
pull_request:
push:
branches:
- main

jobs:
lint:
name: Lint (Prettier)
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Setup Node.js
uses: actions/setup-node@v3

- name: Install dependencies
run: npm ci --no-scripts

- name: Run prettier
run: npx prettier -c .
- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
only_changed: True
commit_message: "(lint): Run prettier against ${{ github.sha }}"
prettier_options: "--write ."

0 comments on commit 2dac7d0

Please sign in to comment.