{"id":26271807,"url":"https://github.com/boxuk/wp-deps-auto-update","last_synced_at":"2026-02-23T00:38:41.769Z","repository":{"id":272300638,"uuid":"911562407","full_name":"boxuk/wp-deps-auto-update","owner":"boxuk","description":"GitHub Action for Auto-Updating WP Deps","archived":false,"fork":false,"pushed_at":"2025-01-13T14:26:12.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-13T15:37:03.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxuk.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T10:04:26.000Z","updated_at":"2025-01-13T14:26:29.000Z","dependencies_parsed_at":"2025-01-13T15:38:57.296Z","dependency_job_id":"2c689d85-04a1-4798-8c03-f0a3376e5f87","html_url":"https://github.com/boxuk/wp-deps-auto-update","commit_stats":null,"previous_names":["boxuk/wp-deps-auto-update"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fwp-deps-auto-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fwp-deps-auto-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fwp-deps-auto-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fwp-deps-auto-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxuk","download_url":"https://codeload.github.com/boxuk/wp-deps-auto-update/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538132,"owners_count":20307104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-14T07:14:48.954Z","updated_at":"2025-10-26T21:02:37.935Z","avatar_url":"https://github.com/boxuk.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Deps Auto Updater\n\nThis is a simple GitHub Worklfow to run the `update-packages` script from the given repository and create a PR with the output. \n\n## Usage\n\nCreate a `.github/workflows/wordpress-deps.yml` file with the following: \n\n```yml\nname: Update WP Deps\n\non:\n  schedule:\n    - cron: '0 3 * * *'\n  workflow_dispatch:\n\njobs:\n  update-deps:\n    runs-on: ubuntu-latest\n    steps:\n      # Setup\n      - name: Checkout\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n          persist-credentials: false\n      - name: Run Update\n        uses: 'boxuk/wp-deps-auto-update@main'\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Save PR number\n        env:\n          PR_NUMBER: ${{ steps.update.outputs.pull-request-number }}\n        run: |\n            mkdir -p ./pr\n            echo $PR_NUMBER \u003e ./pr/pr_number\n      - uses: actions/upload-artifact@v4\n        with:\n          name: pr_number\n          path: pr/\n```\n\nThis will save the PR number created, so you can use it later for triggering tests etc. \n\nFor any other tests etc that you may need to have completed upon creation of this PR, you can then use the `boxuk/wp-checkout-pr` action to setup your tests. \n\n```yml\n# Other config...\non:\n  pull_request: # For all PRs\n  workflow_run: # For WP Updates\n    workflows: [\"Update WP Deps\"]\n    types:\n      - completed\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    name: Test\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        if: github.event_name != 'workflow_run'\n\n      - name: Checkout\n        uses: boxuk/checkout-pr@main\n        id: checkout-deps\n        if: github.event_name == 'workflow_run'\n      \n      # Run Tests or whatever is needed...\n\n      - name: Mark Check Outcome\n        if: github.event_name == 'workflow_run'\n        uses: boxuk/mark-check-status@main\n        with: \n          status: ${{ job.status }}\n          pr-head-sha: ${{ steps.checkout-deps.outputs.pr-head-sha }}\n```\n\n# Setting up your Project for WP Packages\n\nWordPress bundles versions of certain dependancies from WordPress core, and when we use `wp-scripts` to compile our packages it strips out the versions we've defined in `package.json` and instead relies on the versions bundled by WordPress. This means that you should be using the same dependancy version as WordPress provides during development to make sure that you're building compatible code. \n\nBecause of this, you should not allow `dependabot` or other automated solutions to update an `@wordpress/` packages in your node package. Instead, the `wp-scripts` `packages-update` command should be used. \n\n## Setting up your project\n\nYou should define a `WORDPRESS_VERSION` env value in your `.env` file. This should be the major and minor version ie, `6.6` or `7.2`. \n\n\u003e You could use another technique to determine the WordPress version, such as reading from your `composer.json` file. \n\nYour `package.json` file should include a script which handles updating the the WP packages to the given version. If you're using\n`turbo` to manage a mono-repo, this would typically look like: \n```jsonc package.json\n{\n    // ... rest of your package\n    \"scripts\": {\n        // ...any other scripts\n        \"packages-update\": \"turbo run packages-update --concurrency=1 -- -- --dist-tag=wp-$WORDPRESS_VERSION\",\n    }\n}\n```\n\nWithout `turbo` the command would look similar but without the concurrency and the extra `--` args. \n\n## Setting up Dependabot\n\nYou should disable dependabot from updating the included deps, by adding the following to your `dependabot.yml` file: \n```yml\n    # NodeJS Deps\n    - package-ecosystem: npm\n      directory: \"/\"\n      registries: \"*\"\n      schedule:\n          interval: daily\n      ignore:\n      # Ignore updates to the WordPress packages, we'll handle those manually.\n        - dependency-name: \"@wordpress/*\"\n        - dependency-name: \"react\"\n        - dependency-name: \"react-dom\"\n```\n\n## Contributing\n\nPlease do not submit any Pull Requests here. They will be closed.\n---\n\nPlease submit your PR here instead: https://github.com/boxuk/wp-packages\n\nThis repository is what we call a \"subtree split\": a read-only subset of that main repository.\nWe're looking forward to your PR there!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Fwp-deps-auto-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxuk%2Fwp-deps-auto-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Fwp-deps-auto-update/lists"}