From b55f41af1cef45372e10c03e621d2134e7b4d0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gayoso=20Gonz=C3=A1lez?= Date: Thu, 6 Jul 2023 15:45:16 +0200 Subject: [PATCH] Minor: run prettier only on changed files --- .github/workflows/format_vue_code.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/format_vue_code.yml b/.github/workflows/format_vue_code.yml index 20e0f67fa6..363b2cf801 100644 --- a/.github/workflows/format_vue_code.yml +++ b/.github/workflows/format_vue_code.yml @@ -9,10 +9,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + # Make sure the actual branch is checked out when running on pull requests + ref: ${{ github.head_ref }} + # This is important to fetch the changes to the previous commit + 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_options: assets/vue/**/*.{vue,js} -c + prettier_options: assets/vue/**/*.{vue,js} --check + dry: True only_changed: True +