rector/.github/workflows/rector_ci.yaml

41 lines
1.2 KiB
YAML
Raw Normal View History

name: Rector CI
on:
pull_request: null
push:
branches:
- master
jobs:
rector-ci:
runs-on: ubuntu-latest
steps:
2020-03-11 22:31:16 +01:00
-
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.ACCESS_TOKEN }}
2020-03-11 22:31:16 +01:00
-
uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none
2020-03-11 22:31:16 +01:00
- run: composer install --no-progress
- run: composer rector-ci
2020-03-11 21:59:06 +01:00
-
name: Check for modified files
id: git-check
2020-03-12 22:01:14 +01:00
run: echo ::set-output name=modified::$(if git diff --exit-code -s; then echo "false"; else echo "true"; fi)
2020-03-11 21:59:06 +01:00
2020-03-12 21:11:38 +01:00
- name: Push changes
if: steps.git-check.outputs.modified == 'true'
2020-03-11 21:59:06 +01:00
run: |
2020-03-12 21:11:38 +01:00
git config --global user.name 'rector-bot'
git config --global user.email 'tomas@getrector.org'
git commit -am "Bot commit"
git push
exit 1