Make WordPress Core


Ignore:
Timestamp:
08/11/2026 08:13:21 PM (10 hours ago)
Author:
desrosj
Message:

Build/Test Tools: Skip pull_request triggered runs in private repos.

This modifies the conditions for GitHub Actions workflow runs so that they do not run within private forks and mirrors for pull_request events when the PR is in draft status.

For situations where this may be desirable, a Draft Workflow Runs label can be added to a draft pull request to force workflows to run.

Props desrosj, jorbin.
See #65848.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/workflow-lint.yml

    r63167 r63183  
    3333  lint:
    3434    name: Lint GitHub Action files
    35     uses: WordPress/wordpress-develop/.github/workflows/reusable-workflow-lint.yml@trunk
    36     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
     35    uses: ./.github/workflows/reusable-workflow-lint.yml
     36    if: |
     37      github.repository == 'WordPress/wordpress-develop' || (
     38        github.event_name == 'pull_request' && (
     39          ! github.event.repository.private ||
     40          ! github.event.pull_request.draft ||
     41          contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' )
     42        )
     43      )
    3744    permissions:
    3845      security-events: write
Note: See TracChangeset for help on using the changeset viewer.