Update WordPress Core Package #184
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 WordPress Core Package | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' # every day at 3:00 UTC | |
| workflow_dispatch: # allows manual triggering of the workflow | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - run: node generate-packages-json.js | |
| - name: Commit and Push if Changed | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| WP_VERSION=$(node -p 'Object.keys(require("./packages.json").packages["solidbunch/wordpress-core"])[0]') | |
| git add packages.json | |
| git diff --cached --quiet || git commit -m "🔄 Update WordPress core to $WP_VERSION" | |
| git push |