Skip to content

Merge pull request #285 from wp-cli/fix/ai-ergonomics #188477

Merge pull request #285 from wp-cli/fix/ai-ergonomics

Merge pull request #285 from wp-cli/fix/ai-ergonomics #188477

name: Sync GitHub Actions workflows
on:
workflow_dispatch:
push:
branches:
- main
- master
paths:
- '.actrc'
- '.editorconfig'
- 'AGENTS.md'
- '.github/actionlint.yml'
- '.github/dependabot.yml'
- '.github/workflows/check-branch-alias.yml'
- '.github/workflows/copilot-setup-steps.yml'
- '.github/workflows/issue-triage.yml'
- '.github/workflows/manage-labels.yml'
- '.github/workflows/regenerate-readme.yml'
- '.github/workflows/welcome-new-contributors.yml'
- '.github/workflows/sync-workflows.yml'
schedule:
- cron: '43 4 * * *' # Daily, to catch drift from out-of-band edits.
permissions:
contents: read
# A sync pushes to every target repository, so only one may be in flight at a
# time. Queued runs wait instead of cancelling, so a sync that has already
# started always gets to finish.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
sync-workflows:
name: Sync GitHub Actions workflows
runs-on: ubuntu-latest
# Generous, because the job pushes to ~45 repositories. It exists to bound a
# pathological run, not to pace a healthy one. The sync is idempotent, so a
# run cut short here is completed by the next push or the daily schedule.
timeout-minutes: 60
if: ${{ github.repository_owner == 'wp-cli' }}
# The sync authenticates with the ACTIONS_BOT token below, so GITHUB_TOKEN
# is never used to write anything and does not need `contents: write`.
permissions:
contents: read
steps:
- name: Sync files
uses: adrianjost/files-sync-action@55d577a25b7106ebc3001353d981ecf8b0150df4 # v2.1.0
with:
# Patterns are regexes matched against repo-relative paths, so the
# dots are escaped to stop them matching any character.
FILE_PATTERNS: |
^\.actrc
^\.editorconfig
^\.github/actionlint\.yml
^\.github/workflows/copilot-setup-steps\.yml
^\.github/workflows/regenerate-readme\.yml
^\.github/workflows/welcome-new-contributors\.yml
^\.github/workflows/issue-triage\.yml
^\.github/workflows/check-branch-alias\.yml
^\.github/workflows/manage-labels\.yml
^AGENTS\.md
TARGET_REPOS: |
wp-cli/ai-command
wp-cli/ability-command
wp-cli/admin-command
wp-cli/block-command
wp-cli/cache-command
wp-cli/checksum-command
wp-cli/config-command
wp-cli/core-command
wp-cli/cron-command
wp-cli/db-command
wp-cli/dist-archive-command
wp-cli/doctor-command
wp-cli/embed-command
wp-cli/entity-command
wp-cli/eval-command
wp-cli/export-command
wp-cli/extension-command
wp-cli/find-command
wp-cli/i18n-command
wp-cli/import-command
wp-cli/language-command
wp-cli/maintenance-mode-command
wp-cli/media-command
wp-cli/package-command
wp-cli/php-cli-tools
wp-cli/profile-command
wp-cli/restful
wp-cli/rewrite-command
wp-cli/role-command
wp-cli/scaffold-command
wp-cli/scaffold-package-command
wp-cli/search-replace-command
wp-cli/server-command
wp-cli/shell-command
wp-cli/site-health-command
wp-cli/super-admin-command
wp-cli/widget-command
wp-cli/wp-cli
wp-cli/wp-cli-bundle
wp-cli/wp-cli-dev
wp-cli/wp-cli-tests
wp-cli/wp-cli.github.com
wp-cli/wp-config-transformer
wp-cli/wp-super-cache-cli
GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT }}
# Only add and update; never delete a file in a target repo just
# because it is absent here.
SKIP_DELETE: true
sync-dependabot:
name: Sync Dependabot configuration
runs-on: ubuntu-latest
# Generous, because the job pushes to ~45 repositories. It exists to bound a
# pathological run, not to pace a healthy one. The sync is idempotent, so a
# run cut short here is completed by the next push or the daily schedule.
timeout-minutes: 60
if: ${{ github.repository_owner == 'wp-cli' }}
permissions:
contents: read
steps:
- name: Sync files
uses: adrianjost/files-sync-action@55d577a25b7106ebc3001353d981ecf8b0150df4 # v2.1.0
with:
FILE_PATTERNS: |
^\.github/dependabot\.yml
TARGET_REPOS: |
wp-cli/ai-command
wp-cli/ability-command
wp-cli/admin-command
wp-cli/automated-tests
wp-cli/block-command
wp-cli/cache-command
wp-cli/checksum-command
wp-cli/config-command
wp-cli/core-command
wp-cli/cron-command
wp-cli/db-command
wp-cli/dist-archive-command
wp-cli/doctor-command
wp-cli/embed-command
wp-cli/entity-command
wp-cli/eval-command
wp-cli/export-command
wp-cli/extension-command
wp-cli/find-command
wp-cli/google-sitemap-generator-cli
wp-cli/handbook
wp-cli/i18n-command
wp-cli/import-command
wp-cli/language-command
wp-cli/maintenance-mode-command
wp-cli/media-command
wp-cli/package-command
wp-cli/php-cli-tools
wp-cli/profile-command
wp-cli/restful
wp-cli/rewrite-command
wp-cli/role-command
wp-cli/scaffold-command
wp-cli/scaffold-package-command
wp-cli/search-replace-command
wp-cli/server-command
wp-cli/shell-command
wp-cli/site-health-command
wp-cli/super-admin-command
wp-cli/widget-command
wp-cli/wp-cli
wp-cli/wp-cli-bundle
wp-cli/wp-cli-dev
wp-cli/wp-cli-tests
wp-cli/wp-config-transformer
wp-cli/wp-super-cache-cli
GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT }}
# Only add and update; never delete a file in a target repo just
# because it is absent here.
SKIP_DELETE: true