From e73226622083deb3ec5289ea517b9963e1998b77 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 17 Mar 2023 09:34:30 -0400 Subject: feat(actions): add prettier format action --- .github/workflows/format.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/format.yaml (limited to '.github/workflows/format.yaml') diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 0000000..4b96fb3 --- /dev/null +++ b/.github/workflows/format.yaml @@ -0,0 +1,31 @@ +name: format + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + format: + runs-on: ubuntu-latest + + steps: + - name: checkout repository + uses: actions/checkout@v3 + + - name: setup node + uses: actions/setup-node@v3 + + - name: install prettier + run: | + npm install -g prettier + + - name: format + run: prettier --editorconfig -w . + + - name: add and commit + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: "chore: format with prettier" -- cgit v1.2.3