Skip to content

Monthly Pull Requests #12

Monthly Pull Requests

Monthly Pull Requests #12

name: Monthly Pull Requests
on:
schedule:
# https://crontab.guru/every-month
- cron: "0 0 1 * *"
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:
- name: "Checkout"
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
# see https://github.com/shivammathur/setup-php
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: "Install Composer dependencies"
uses: ramsey/composer-install@v3
- name: "Run command"
run: ${{ matrix.actions.run }}
# see https://github.com/peter-evans/create-pull-request
- name: "Create pull-request"
uses: peter-evans/[email protected]
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