Update WP Deps #537
This file contains hidden or 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: Update WP Deps | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| jobs: | |
| update-deps: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Setup | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| # Read the current WP version from the `roots/wordpress-full` package in `composer.lock`, and save it to the environment with just the major and minor version. | |
| - name: Read WP version | |
| run: echo "WP_VERSION=$(jq -r '.packages[] | select(.name == "roots/wordpress-no-content") | .version' composer.lock | cut -d '.' -f 1,2)" >> $GITHUB_ENV | |
| - name: Run Update | |
| id: update | |
| uses: 'boxuk/wp-deps-auto-update@main' | |
| with: | |
| WP_VERSION: ${{ env.WORDPRESS_VERSION }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Save PR number | |
| env: | |
| PR_NUMBER: ${{ steps.update.outputs.pull-request-number }} | |
| run: | | |
| mkdir -p ./pr | |
| echo $PR_NUMBER > ./pr/pr_number | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: pr_number | |
| path: pr/ |