Skip to content

Weekly Pull Requests #123

Weekly Pull Requests

Weekly Pull Requests #123

name: Weekly Pull Requests
on:
schedule:
# https://crontab.guru/once-a-week
- cron: "0 0 * * 0"
env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
weekly_pull_requests:
# Don't run on forks.
if: github.repository == 'sabbelasichon/typo3-rector'
strategy:
fail-fast: false
matrix:
actions:
-
name: 'Apply Coding Standard'
run: "composer fix-style"
branch: 'automated-apply-coding-standards'
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- uses: "ramsey/composer-install@v2"
- run: ${{ matrix.actions.run }}
# see https://github.com/peter-evans/create-pull-request
-
name: Create pull-request
uses: peter-evans/create-pull-request@v5.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "[automated] ${{ matrix.actions.name }}"
base: 'main'
branch: ${{ matrix.actions.branch }}
title: '[automated] ${{ matrix.actions.name }}'
delete-branch: true
-
name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash