Skip to content

Auto Regenerate

Auto Regenerate #3

name: "Auto Regenerate"
on:
schedule:
- cron: '0 3 * * *'
jobs:
auto-regenerate:
name: "Auto Regenerate"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "8.3"
- name: "Check out salathe/phpdoc-base"
uses: "actions/checkout@v4"
with:
path: "generator/doc/doc-en/doc-base"
repository: "salathe/phpdoc-base"
- name: "Check out php/doc-en"
uses: "actions/checkout@v4"
with:
path: "generator/doc/doc-en/en"
repository: "php/doc-en"
- name: "Install dependencies with composer in generator/ directory"
run: "composer install --no-interaction"
working-directory: "generator"
- name: "Install dependencies with composer in root/ directory"
run: "composer install --no-interaction"
- name: "Dump autoloader with composer in root directory"
run: "composer dump-autoload"
- name: "Regenerate files"
run: "./safe.php generate && git diff --exit-code"
working-directory: "generator"
- name: "Create a pr if the files are different"
if: ${{ failure() }}
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatically regenerate the files"
branch: create-pull-request/regenerate-files
title: "Automatically regenerate the files"
labels: "regenerate, auto"
assignees: "shish"