Skip to content

Commit bfb2fa6

Browse files
Update code-style.yml
1 parent b5bff64 commit bfb2fa6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/code-style.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
id: can_fix
1717
shell: bash
1818
run: |
19-
CAN_FIX: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
19+
CAN_FIX=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
2020
21-
echo "enabled=${CAN_FIX}" >> "$GITHUB_OUTPUT"
21+
echo "CAN_FIX=${CAN_FIX}" >> "$GITHUB_ENV"
2222
2323
- name: Setup Composer
2424
run: |
@@ -35,15 +35,15 @@ jobs:
3535
run: codestyle pint 8.2
3636

3737
- name: Normalize composer.json
38-
if: ${{ steps.can_fix.outputs.enabled == '1' }}
38+
if: ${{ env.CAN_FIX }}
3939
run: composer normalize
4040

4141
- name: Fix PHP code-style
42-
if: ${{ steps.can_fix.outputs.enabled == '1' }}
42+
if: ${{ env.CAN_FIX }}
4343
run: pint --parallel
4444

4545
- name: Check PHP code-style
46-
if: ${{ steps.can_fix.outputs.enabled == '0' }}
46+
if: ${{ env.CAN_FIX }} == false
4747
run: pint --parallel --test
4848

4949
node:
@@ -62,9 +62,9 @@ jobs:
6262
id: can_fix
6363
shell: bash
6464
run: |
65-
CAN_FIX: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
65+
CAN_FIX=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
6666
67-
echo "enabled=${CAN_FIX}" >> "$GITHUB_OUTPUT"
67+
echo "CAN_FIX=${CAN_FIX}" >> "$GITHUB_ENV"
6868
6969
- name: Detect package.json
7070
id: has_pkg
@@ -86,19 +86,19 @@ jobs:
8686
run: codestyle npm
8787

8888
- name: Node code-style
89-
if: ${{ steps.can_fix.outputs.enabled == '1' }}
89+
if: ${{ env.CAN_FIX }}
9090
run: |
9191
npx @biomejs/biome lint --write
9292
npx @biomejs/biome format --write
9393
9494
- name: Node code-style
95-
if: ${{ steps.can_fix.outputs.enabled == '0' }}
95+
if: ${{ env.CAN_FIX }} == false
9696
run: |
9797
npx @biomejs/biome lint
9898
npx @biomejs/biome format
9999
100100
- name: Remove node_modules
101-
if: ${{ steps.can_fix.outputs.enabled == '1' }}
101+
if: ${{ env.CAN_FIX }}
102102
run: rm -rf node_modules
103103

104104
- name: Remove package.json

0 commit comments

Comments
 (0)