Skip to content

sync

sync #82

Workflow file for this run

name: sync
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist
- name: Sync files
run: |
composer sync-parser-class
composer sync-markdown-class
- name: Create a Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
commit-message: Sync classes
branch: sync
delete-branch: true
title: Sync classes
body: |
Sync classes from WordPress.org repository.