From b1f1ad53333233ed7e7c4ea3b57f0a3c68d664fc Mon Sep 17 00:00:00 2001 From: Luis Date: Thu, 18 Jul 2024 00:07:58 -0400 Subject: [PATCH] Create prettie.yml Signed-off-by: Luis --- .github/workflows/prettie.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/prettie.yml diff --git a/.github/workflows/prettie.yml b/.github/workflows/prettie.yml new file mode 100644 index 0000000..725923b --- /dev/null +++ b/.github/workflows/prettie.yml @@ -0,0 +1,34 @@ + +name: Prettier + +on: + pull_request: + branches: [main] + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 21 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Run Prettier + run: npx prettier --write . + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore:prettier" + branch: ${{ github.head_ref }}