config-command/.github/workflows/update-framework.yml
dependabot[bot] 53a7702911
Some checks failed
Code Quality Checks / code-quality (push) Waiting to run
Regenerate README file / regenerate-readme (push) Waiting to run
Testing / test (push) Waiting to run
Copilot Setup Steps / Setup environment (push) Failing after -1s
Update wp-cli framework / Update wp-cli framework (push) Failing after -1s
Deployment / Build Phar (push) Failing after 22s
Deployment / Functional - WP 4.9 on PHP 7.2 with MySQL 5.6 (push) Has been skipped
Deployment / Functional - WP trunk on PHP 7.4 with MySQL 5.6 (push) Has been skipped
Deployment / Functional - WP trunk on PHP 8.5 with MySQL 5.6 (push) Has been skipped
Deployment / Functional - WP trunk on PHP 7.4 with MySQL 5.7 (push) Has been skipped
Deployment / Functional - WP trunk on PHP 8.5 with MySQL 5.7 (push) Has been skipped
Deployment / Functional - WP 6.9 on PHP 7.2 with MySQL 8.0 (push) Has been skipped
Deployment / Functional - WP latest on PHP 7.4 with MySQL 8.0 (push) Has been skipped
Deployment / Functional - WP trunk on PHP 7.4 with MySQL 8.0 (push) Has been skipped
Deployment / Functional - WP latest on PHP 8.5 with MySQL 8.0 (push) Has been skipped
Deployment / Functional - WP trunk on PHP 8.5 with MySQL 8.0 (push) Has been skipped
Deployment / Deployment (push) Has been skipped
Deployment / Build RPM package (push) Has been skipped
Deployment / Build DEB package (push) Has been skipped
Bump actions/checkout from 6.0.3 to 7.0.0 (#1061)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6.0.3...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-18 20:38:07 +02:00

90 lines
3.2 KiB
YAML

name: Update wp-cli framework
on:
workflow_dispatch:
push:
branches:
- main
- master
schedule:
- cron: '17 4 * * *' # Run every day on a seemly random time.
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
update-framework: #----------------------------------------------------------
name: Update wp-cli framework
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'wp-cli' }}
steps:
- name: Check out source code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.ACTIONS_BOT }}
- name: Set up PHP environment
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: 'latest'
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check existence of composer.json file
id: check_composer_file
run: echo "files_exists=$(test -f composer.json && echo true || echo false)" >> "$GITHUB_OUTPUT"
- name: Install Composer dependencies & cache dependencies
if: steps.check_composer_file.outputs.files_exists == 'true'
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4
env:
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Update wp-cli framework
run: |
composer update wp-cli/wp-cli --with-all-dependencies
- name: Commit and Create Pull Request
env:
GH_TOKEN: ${{ secrets.ACTIONS_BOT }}
PR_BODY: |
**This is an automated pull-request**
Updates the `wp-cli/wp-cli` framework to the latest changeset.
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b update-framework
git add composer.json composer.lock
git commit -m "Update wp-cli framework"
git push -f origin update-framework
PR_NUMBER=$(gh pr list --head update-framework --json number --jq '.[0].number // empty')
if [ -z "$PR_NUMBER" ]; then
gh pr create \
--title "Update wp-cli framework" \
--body "$PR_BODY" \
--label "scope:framework" \
--base "${{ github.event.repository.default_branch }}" \
--head "update-framework"
else
gh pr edit "$PR_NUMBER" \
--title "Update wp-cli framework" \
--body "$PR_BODY" \
--add-label "scope:framework" \
--base "${{ github.event.repository.default_branch }}"
fi
fi