Make WordPress Core


Ignore:
Timestamp:
05/17/2024 05:41:40 PM (2 years ago)
Author:
desrosj
Message:

Build/Test Tools: Convert GitHub action workflows into reusable ones.

With a few exceptions, GitHub Actions workflows run using the version of the workflow file present in the commit SHA or Git ref for the triggering event. This is useful for maintaining different versions of a workflow file.

In the case of WordPress where there are currently 25+ branches that could potentially receive a security fix, it creates a huge maintenance burden. When 3rd party actions are updated or features are deprecated on GitHub Actions, the required changes need to be backported to all of those branches. This takes considerable time and effort.

This change converts Core’s workflow files to reusable ones. This allows the same workflow to be used for all (or most) branches, allowing the described maintenance updates to be made once in trunk.

To keep track of which files are reusable vs. those that are responsible for holding the strategy matrix for that branch, reusable workflows are now prefixed with reusable-.

Props johnbillion, swissspidy, jorbin, desrosj.
Fixes #61213.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/phpunit-tests.yml

    r58097 r58165  
    3737  test-with-mysql:
    3838    name: PHP ${{ matrix.php }}
    39     uses: WordPress/wordpress-develop/.github/workflows/phpunit-tests-run.yml@trunk
     39    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk
    4040    permissions:
    4141      contents: read
     
    109109  test-with-mariadb:
    110110    name: PHP ${{ matrix.php }}
    111     uses: WordPress/wordpress-develop/.github/workflows/phpunit-tests-run.yml@trunk
     111    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk
    112112    permissions:
    113113      contents: read
Note: See TracChangeset for help on using the changeset viewer.