Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/cs-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on:
push:
branches:
- '*'

name: Fix Code Style

jobs:
cs-fix:
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,37 @@ Now you can run the following commands:
composer cs:diff
composer cs:fix
```

## CI integration

If you want to integrate code style check into CI, add the following step to your GitHub Actions configuration file:

```yaml
on:
push:
branches:
- '*'

name: Check Code Style

jobs:
cs-fix:
uses: spiral/gh-actions/.github/workflows/cs.yml@master
```

If you want GitHub Actions to automatically fix the found errors, add the following step:

```yaml
on:
push:
branches:
- '*'

name: Fix Code Style

jobs:
cs-fix:
permissions:
contents: write
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
```