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 14, 2023
1 parent 0c64136 commit 27b3ddd
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 27b3ddd

Please sign in to comment.