From 70db923e90436ef4c9683018751fb8179effc4a9 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 | 17 ++++++++--------- .github/workflows/preview.yml | 3 +++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 12d58af1..68149543 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,10 @@ 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 }} + json='{"status": "1"}' && echo "$json" > status.json + - uses: actions/upload-artifact@v4 + with: + name: status + path: "status.json" + \ 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