Build WordPress stubs #480
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build WordPress stubs | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-stubs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.0 | |
coverage: none | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Generate stubs | |
run: php generate.php | |
- name: Add, commit, and push | |
run: | | |
git config user.email ${{ secrets.DEPLOYBOT_EMAIL }} | |
git config user.name ${{ secrets.DEPLOYBOT_USER }} | |
git config --add safe.directory "${GITHUB_WORKSPACE}" | |
git add ./stubs/* | |
git add ./packages.json | |
git commit -m "Update WordPress stubs" || echo 'Nothing to commit' | |
git push |