2023-02-28 17:00:04 +00:00
|
|
|
# github action that checks code with Rector
|
|
|
|
name: Rector
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: null
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rector:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-02 18:32:46 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name == '__CURRENT_REPOSITORY__'
|
2023-02-28 17:00:04 +00:00
|
|
|
steps:
|
|
|
|
-
|
2023-03-01 22:23:24 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
2023-09-04 14:00:44 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-28 17:00:04 +00:00
|
|
|
with:
|
2023-03-01 22:23:24 +00:00
|
|
|
# Must be used to trigger workflow after push
|
2023-02-28 17:00:04 +00:00
|
|
|
token: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
-
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2024-01-02 02:40:38 +00:00
|
|
|
php-version: 8.2
|
2023-02-28 17:00:04 +00:00
|
|
|
coverage: none
|
|
|
|
|
|
|
|
- uses: "ramsey/composer-install@v2"
|
|
|
|
|
|
|
|
- run: vendor/bin/rector --ansi
|
2024-01-24 21:26:26 +00:00
|
|
|
# @todo apply coding standard if used
|
2023-02-28 17:00:04 +00:00
|
|
|
|
|
|
|
-
|
|
|
|
# commit only to core contributors who have repository access
|
2023-02-28 17:44:40 +00:00
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
2023-02-28 17:00:04 +00:00
|
|
|
with:
|
2023-02-28 17:44:40 +00:00
|
|
|
commit_message: '[rector] Rector fixes'
|
|
|
|
commit_author: 'GitHub Action <actions@github.com>'
|
|
|
|
commit_user_email: 'action@github.com'
|