Skip to content

Commit 0b49a5e

Browse files
Merge pull request #272 from TheDragonCode/6.x
Export styler to common repository
2 parents 7a8686b + 36b7260 commit 0b49a5e

1 file changed

Lines changed: 2 additions & 102 deletions

File tree

.github/workflows/code-style.yml

Lines changed: 2 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -7,105 +7,5 @@ on:
77
permissions: write-all
88

99
jobs:
10-
Check:
11-
runs-on: ubuntu-latest
12-
13-
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }}
14-
15-
steps:
16-
- uses: actions/checkout@v5
17-
- uses: shivammathur/setup-php@v2
18-
19-
- uses: actions/setup-node@v4
20-
with:
21-
node-version: 'latest'
22-
23-
- name: Install Composer dependencies
24-
run: composer global require dragon-code/codestyler
25-
26-
- name: Install Node dependencies
27-
run: npm i -D @biomejs/biome
28-
29-
- name: Publish config files
30-
run: |
31-
codestyle pint 8.2
32-
codestyle npm
33-
34-
- name: PHP code-style
35-
run: pint --parallel --test
36-
37-
- name: Node code-style
38-
run: |
39-
npx @biomejs/biome lint
40-
npx @biomejs/biome format
41-
42-
Fix:
43-
runs-on: ubuntu-latest
44-
45-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
46-
47-
steps:
48-
- uses: actions/checkout@v5
49-
- uses: shivammathur/setup-php@v2
50-
51-
- uses: actions/setup-node@v4
52-
with:
53-
node-version: 'latest'
54-
55-
- name: Detect package.json
56-
id: has_pkg
57-
shell: bash
58-
run: |
59-
if [ -f package.json ]; then
60-
echo "HAS_PACKAGE_JSON=1" >> "$GITHUB_ENV"
61-
else
62-
echo "HAS_PACKAGE_JSON=0" >> "$GITHUB_ENV"
63-
fi
64-
65-
- name: Setup Composer
66-
run: |
67-
composer global config --no-plugins allow-plugins.laravel/pint true
68-
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
69-
70-
composer config --no-plugins allow-plugins.laravel/pint true
71-
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
72-
73-
- name: Install Composer dependencies
74-
run: composer global require dragon-code/codestyler
75-
76-
- name: Install Node dependencies
77-
run: npm i -D @biomejs/biome
78-
79-
- name: Publish config files
80-
run: |
81-
codestyle pint 8.2
82-
codestyle npm
83-
84-
- name: Normalize composer.json
85-
run: composer normalize
86-
87-
- name: PHP code-style
88-
run: pint --parallel
89-
90-
- name: Node code-style
91-
run: |
92-
npx @biomejs/biome lint --write
93-
npx @biomejs/biome format --write
94-
95-
- name: Remove node_modules
96-
run: rm -rf node_modules
97-
98-
- name: Remove package.json
99-
if: ${{ env.HAS_PACKAGE_JSON == '0' }}
100-
run: rm package.json
101-
102-
- name: Create a Pull Request
103-
uses: peter-evans/create-pull-request@v7
104-
with:
105-
branch: code-style
106-
branch-suffix: random
107-
delete-branch: true
108-
title: "🦋 The code style has been fixed"
109-
commit-message: 🦋 The code style has been fixed
110-
body: The code style has been fixed
111-
labels: code-style
10+
Styler:
11+
uses: TheDragonCode/.github/.github/workflows/code-style.yml@main

0 commit comments

Comments
 (0)