Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/deploy-cors-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ concurrency:

jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by a maintainer listed below
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a maintainer listed below
# TODO: Can we check for group membership?
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.event_name == 'workflow_run' ||
github.event_name == 'workflow_dispatch' ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-my-wordpress-net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ concurrency:

jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.event_name == 'workflow_run' ||
(github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]') ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ concurrency:

jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by another workflow OR a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by another workflow OR a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The literal repository string WordPress/wordpress-playground is duplicated across many workflows in this PR, which makes future renames/error fixes repetitive and easier to miss. Consider centralizing it via a repo/org variable (e.g., vars.OFFICIAL_REPO) and comparing against that, or using a less brittle predicate like github.repository_owner == 'WordPress' combined with the repo name.

Suggested change
github.repository == 'WordPress/wordpress-playground' &&
github.repository_owner == 'WordPress' &&
github.event.repository.name == 'wordpress-playground' &&

Copilot uses AI. Check for mistakes.
github.ref == 'refs/heads/trunk' && (
github.event_name == 'workflow_run' ||
(github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]') ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-devtools-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ on:

jobs:
publish:
# Only run this workflow from the trunk branch and when triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/publish-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ permissions:

jobs:
create-release:
# Only create a release after a successful npm publish on trunk,
# or when triggered manually.
# Only run on the playground repo. Create a release after a successful
# npm publish on trunk, or when triggered manually.
if: >
github.event_name == 'workflow_dispatch' ||
github.repository == 'WordPress/wordpress-playground' &&
(
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'trunk'
github.event_name == 'workflow_dispatch' ||
(
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'trunk'
)
)

runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ permissions:

jobs:
release:
# Only allow Playground maintainers to trigger this workflow.
# Only run on the playground repo, and only allow Playground maintainers to trigger this workflow.
# Non-trunk branches are allowed but require a custom dist tag (not "latest").
if: >
github.repository == 'WordPress/wordpress-playground' &&
(
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-self-hosted-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ on:

jobs:
publish:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/refresh-sqlite-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:

jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/refresh-wordpress-major-and-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ concurrency:

jobs:
build_wordpress_major_and_beta_push_to_github_and_deploy_website:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/refresh-wordpress-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:

jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ on:

jobs:
release:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
Comment on lines 18 to 20
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the guard is added to deploy/publish/refresh workflows, but this PR also updates update-changelog.yml. Either update the PR description to include this workflow or drop the change here to keep scope aligned.

Copilot uses AI. Check for mistakes.
github.event.workflow_run.conclusion == 'success' ||
github.actor == 'adamziel' ||
Expand Down
Loading