Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 10 May 11:21
· 290 commits to master since this release

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/git-auto-commit-action@v4.2.0
      with:
        commit_message: Apply php-cs-fixer changes

Thanks to @spawnia for pointing this out and for cleaning up the README.