Skip to content

Commit

Permalink
Update code-style.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar authored Dec 13, 2023
1 parent e1b81f5 commit 8ca9884
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +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' }}
fix: true

0 comments on commit 8ca9884

Please sign in to comment.