Skip to content

Weekly Pull Requests #79

Weekly Pull Requests

Weekly Pull Requests #79

# inspiration from https://github.com/symplify/symplify/blob/main/.github/workflows/weekly_pull_request.yaml
name: Weekly Pull Requests
on:
schedule:
# https://crontab.guru/once-a-week
- cron: "0 0 * * 0"
jobs:
weekly_pull_requests:
name: Re-Apply Coding Standards
runs-on: ubuntu-latest
# don't run this action on forks
if: github.repository_owner == 'vuongxuongminh'
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- uses: "ramsey/composer-install@v2"
- run: make cs-fix
- name: Create pull-request
uses: peter-evans/create-pull-request@v3
id: cpr
with:
token: ${{ secrets.ACCESS_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@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash