mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-12-06 02:09:04 +00:00
parent
26a56d2023
commit
db25cb8fde
32
README.md
32
README.md
@ -47,13 +47,41 @@ The most common use case for this, is when you're running a Linter or Code-Style
|
|||||||
In this example I'm running `php-cs-fixer` in a PHP project.
|
In this example I'm running `php-cs-fixer` in a PHP project.
|
||||||
|
|
||||||
|
|
||||||
|
### Example with `actions/checkout@v2`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: php-cs-fixer
|
||||||
|
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
php-cs-fixer:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: Run php-cs-fixer
|
||||||
|
uses: docker://oskarstark/php-cs-fixer-ga
|
||||||
|
|
||||||
|
- uses: stefanzweifel/git-auto-commit-action@v2.5.0
|
||||||
|
with:
|
||||||
|
commit_message: Apply php-cs-fixer changes
|
||||||
|
branch: ${{ github.head_ref }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example with `actions/checkout@v1`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: php-cs-fixer
|
name: php-cs-fixer
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
|
||||||
- '**.php'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
php-cs-fixer:
|
php-cs-fixer:
|
||||||
|
Loading…
Reference in New Issue
Block a user