Skip to content

Commit

Permalink
Merge pull request #225 from TheDragonCode/4.x
Browse files Browse the repository at this point in the history
Fixed `code-style.yml` and update `README.md`
  • Loading branch information
andrey-helldar authored Mar 27, 2024
2 parents de5392f + b364653 commit 3922fd9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ jobs:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none

- name: Setup Dependencies
run: |
composer global config --no-plugins allow-plugins.dragon-code/codestyler true
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer global config --no-plugins allow-plugins.symfony/thanks true
composer config --no-plugins allow-plugins.dragon-code/codestyler true
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer config --no-plugins allow-plugins.symfony/thanks true
- name: Install dependency
run: |
composer global require dragon-code/codestyler
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ jobs:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none

- name: Setup Dependencies
run: |
composer global config --no-plugins allow-plugins.dragon-code/codestyler true
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer global config --no-plugins allow-plugins.symfony/thanks true
composer config --no-plugins allow-plugins.dragon-code/codestyler true
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer config --no-plugins allow-plugins.symfony/thanks true
- name: Install dependency
run: |
composer global require dragon-code/codestyler
Expand Down Expand Up @@ -250,6 +260,36 @@ jobs:
labels: code-style
```
You can also use a simplified version of the configuration by linking to our settings.
In this case, the following settings will be applied:
- Always checks if the event is not equal to `push` or the branch is not equal to `main`
- Correcting the code style will take the following steps:
- Will add the following plugins to the list
of [allowed plugins](https://getcomposer.org/doc/06-config.md#allow-plugins)
in your `composer.json` file:
- `dragon-code/codestyler`
- `ergebnis/composer-normalize`
- `symfony/thanks`
- Updates the `.github/dependabot.yml` file
- Updates the `.editorconfig` file
- Will correct the order of elements in the `composer.json` file to match
the [official schema](https://github.com/composer/composer/blob/main/res/composer-schema.json).
- Corrects the code style of your project.

```yml
name: Code Style
on: [ push, pull_request ]
permissions: write-all
jobs:
check:
uses: TheDragonCode/.github/.github/workflows/code-style.yml@main
```

### Other CI/CD

```bash
Expand Down

0 comments on commit 3922fd9

Please sign in to comment.