From 07e55787a40971bd19147471b0f12308ce6458a5 Mon Sep 17 00:00:00 2001 From: Akash Kumar Date: Mon, 18 Sep 2023 09:09:34 +0530 Subject: [PATCH] ci: add prettify code ci workflow Signed-off-by: Akash Kumar --- .github/workflows/prettify_code.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/prettify_code.yml diff --git a/.github/workflows/prettify_code.yml b/.github/workflows/prettify_code.yml new file mode 100644 index 000000000..47cb584d7 --- /dev/null +++ b/.github/workflows/prettify_code.yml @@ -0,0 +1,27 @@ +name: Prettify Code +# This action works with pull requests and pushes +on: + pull_request: + push: + branches: + - main + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Prettify code + uses: creyD/prettier_action@v4.3 + with: + # This part is also where you can pass other options, for example: + prettier_version: 2.8.8 + prettier_options: --write **/*.{js,md} + same_commit: true + \ No newline at end of file