From 27b3dddb2ab60d3840a734828bbe54d724890a6b Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Thu, 14 Dec 2023 22:06:13 +0300 Subject: [PATCH] Update code-style.yml --- .github/workflows/code-style.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 69635d8..ec1076c 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -12,16 +12,13 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Detect job name - id: detect - run: | - [[ ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} ]] && NAME="Fix" || NAME="Check" - - echo "name=${NAME}" >> $GITHUB_OUTPUT + - name: Check the code style + uses: TheDragonCode/codestyler@v3 + if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }} - - name: ${{ steps.detect.outputs.name }} the code style + - name: Fix the code style uses: TheDragonCode/codestyler@v3 + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: github_token: ${{ secrets.COMPOSER_TOKEN }} - fix: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - verbose: true + fix: true