Changed
branch
-value for pull_request
-event is now optional
We've updated the default branch value to be ${{ github.head_ref }}
instead of ``. Due to this change, you no longer have to set a branch
-value when listening to the `pull_request` event.
This change now allows you to create a single workflow which listens both to the pull_request
and push
-event.
name: php-cs-fixer
on:
pull_request:
push:
branches:
- master
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/[email protected]
with:
commit_message: Apply php-cs-fixer changes
Thanks to @spawnia for pointing this out and for cleaning up the README.