[CI] move ci-review to daily PRs

This commit is contained in:
Tomas Votruba 2020-11-15 15:14:49 +00:00
parent 5e344c7920
commit 0c45b6f569
2 changed files with 10 additions and 77 deletions

View File

@ -1,77 +0,0 @@
name: CI Review
on:
pull_request: null
push:
branches:
- master
jobs:
ci_review:
strategy:
fail-fast: false
matrix:
actions:
-
name: "Validate Monorepo"
write_run: "composer propagate --ansi"
commit_message: "propagate monorepo dependencies"
check_run: "composer validate-monorepo --ansi"
-
name: 'Apply Coding Standard'
write_run: "composer fix-cs"
commit_message: "Apply coding standards"
check_run: "composer check-cs"
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
steps:
# workaround for missing secret in fork PRs - see https://github.com/actions/checkout/issues/298
# see https://github.com/rectorphp/rector/commit/d395e1c28b8e6a56711dcc2e10490a82965850e4
-
if: github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@v2
with:
# Must be used to trigger workflow after push
token: ${{ secrets.ACCESS_TOKEN }}
# in forks, the token is not available - so we cannot us eit
-
if: github.event.pull_request.head.repo.full_name != github.repository
uses: actions/checkout@v2
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
tools: composer:v1
- run: composer install --no-progress --ansi
-
# Check if the event is not triggered by a fork
if: github.event.pull_request.head.repo.full_name == github.repository
run: ${{ matrix.actions.write_run }}
# see https://github.com/EndBug/add-and-commit
-
# Check if the event is not triggered by a fork
if: github.event.pull_request.head.repo.full_name == github.repository
uses: EndBug/add-and-commit@v5.1.0
with:
# The arguments for the `git add` command (see the paragraph below for more info)
add: .
message: '[ci-review] ${{ matrix.actions.commit_message }}'
author_name: rector-bot
author_email: tomas@getrector.org
env:
# to get push access
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- run: ${{ matrix.actions.check_run }}

View File

@ -26,6 +26,16 @@ jobs:
run: "composer changelog"
branch: 'automated-regenerated-changelog'
-
name: "Re-Propagate Monorepo Dependencies"
run: "composer propagate --ansi"
branch: 'automated-propagate-monorepo-dependencies'
-
name: 'Apply Coding Standard'
run: "composer fix-cs"
branch: 'automated-apply-coding-standards'
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest