Bot releases are visible (Hide)
Published by stefanzweifel over 4 years ago
Published by github-actions[bot] over 4 years ago
branch
-value for pull_request
-event is now optionalWe'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.
Published by github-actions[bot] over 4 years ago
This release switches this Action from a Docker action to a node Action. The script now runs in the node12
-environment.
This change brings the following benefits:
husky
can now be executed before a commit is created.See #45 for more information.
Published by stefanzweifel over 4 years ago
v3.0.0 comes with a couple of breaking changes and 3 new input options.
action/checkout@v2
. The action/checkout
team made some significant changes to the Action which we take advantage of (see next point).GITHUB_TOKEN
. As mentioned in the first point, you should now use action/checkout@v2
. v2 of the Action persists the used authentication token, so other Actions in the Workflow run can execute git commands which interract with GitHub. If you experience problems, you can still overwrite the used token (with a Personal Access Token for example). Checkout the usage documentation of actions/checkout
for details.We've added 3 new options to allow you to customize the commit user and author:
commit_user_email
: Defaults to "[email protected]"commit_user_name
: Defaults to "GitHub Actions"commit_author
: Defaults to "github_username [email protected]"Checkout the action.yml
file for more detailed information.
The branch
input option is now optional (again). action/checkout@v2
no longer leaves the repo in a detached HEAD state in Workflows listening to the push
-event. This allows us to simply call git push origin
to push the changes back to the repository.
However, the branch
input option is still required for Workflows which listen to the pull_request
event. Checkout the usage examples in the README.
Following are 2 Workflow examples on how you can use this Action on Workflows which listen to push
and pull_request
-events.
push
-eventname: Format PHP
on: push
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run php-cs-fixer
uses: docker://oskarstark/php-cs-fixer-ga
- uses: stefanzweifel/[email protected]
with:
commit_message: Apply php-cs-fixer changes
pull_request
-eventname: Format PHP
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/[email protected]
with:
commit_message: Apply php-cs-fixer changes
branch: ${{ github.head_ref }}