From fd009ef00a0919a53194ac9d300772730087db9a Mon Sep 17 00:00:00 2001 From: Raman Aktsisiuk Date: Mon, 2 Sep 2024 20:29:08 +0200 Subject: [PATCH] ci: add comment if can't be auto fixed --- .github/workflows/lint.yml | 14 ++++---------- .github/workflows/preview.yml | 3 +++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 12d58af1..e91ae84e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,8 @@ name: Lint on: workflow_call -permissions: write-all +permissions: + contents: write jobs: prettier: @@ -30,12 +31,5 @@ jobs: - name: Run prettier id: prettier_run if: steps.prettier_check.outputs.PRETTIER_EXIT_CODE == 1 - run: npm run prettify - - name: Commit and push changes - if: ${{ success() && steps.prettier_run.conclusion == 'success' }} - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - git commit -am "chore: run prettier" - git push origin HEAD:${{ github.event.pull_request.head.ref }} + run: exit 1 + \ No newline at end of file diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index f632fbc7..3c007308 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -2,6 +2,9 @@ name: preview on: pull_request +permissions: + contents: write + jobs: lint: uses: ./.github/workflows/lint.yml