Skip to content

Commit 26c394c

Browse files
Merge pull request #269 from TheDragonCode/6.x
Introduced environment variable to check `package.json` presence
2 parents a6fbc81 + 67d3790 commit 26c394c

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/code-style.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
runs-on: ubuntu-latest
4444

4545
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
46+
47+
env:
48+
HAS_PACKAGE_JSON: ${{ hashFiles('package.json') != '' && '1' || '0' }}
4649

4750
steps:
4851
- uses: actions/checkout@v5
@@ -54,10 +57,10 @@ jobs:
5457

5558
- name: Setup Composer
5659
run: |
57-
composer global config --no-plugins allow-plugins.dragon-code/codestyler true
60+
composer global config --no-plugins allow-plugins.laravel/pint true
5861
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
5962
60-
composer config --no-plugins allow-plugins.dragon-code/codestyler true
63+
composer config --no-plugins allow-plugins.laravel/pint true
6164
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
6265
6366
- name: Install Composer dependencies
@@ -82,6 +85,13 @@ jobs:
8285
npx @biomejs/biome lint --write
8386
npx @biomejs/biome format --write
8487
88+
- name: Remove node_modules
89+
run: rm -rf node_modules
90+
91+
- name: Remove package.json
92+
if: ${{ env.HAS_PACKAGE_JSON == '0' }}
93+
run: rm package.json
94+
8595
- name: Create a Pull Request
8696
uses: peter-evans/create-pull-request@v7
8797
with:

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
],
6363
"config": {
6464
"allow-plugins": {
65-
"dragon-code/codestyler": true,
6665
"ergebnis/composer-normalize": true
6766
},
6867
"optimize-autoloader": true,

0 commit comments

Comments
 (0)