From 1b40a6baa31e2f26aff53f3461b05fa0e544f957 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 29 Apr 2023 07:54:14 +0530 Subject: [PATCH] Print the diff --- .github/workflows/prettier.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 06765500..488c2675 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -10,9 +10,18 @@ jobs: steps: - name: Check out repo uses: actions/checkout@v2 - - uses: actionsx/prettier@v2 + - uses: actions/cache@v2 + name: Configure npm caching with: - # prettier CLI arguments. - args: --write "./**/*.js" - - name: Get Diff - run: git diff \ No newline at end of file + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} + restore-keys: | + ${{ runner.os }}-npm- + - name: Run prettier + run: |- + npm run prettier-write + - name: Print the diff + run: git diff; git reset --hard + - name: Run prettier + run: |- + npm run prettier-check \ No newline at end of file