Make WordPress Core


Ignore:
Timestamp:
05/17/2024 05:41:40 PM (7 months 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/upgrade-testing.yml

    r57985 r58165  
    3636  upgrade-tests-wp-6x-mysql:
    3737    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    38     uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
     38    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
    3939    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    4040    permissions:
     
    6161  upgrade-tests-wp-5x-php-7x-mysql:
    6262    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    63     uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
     63    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
    6464    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    6565    strategy:
     
    8888  upgrade-tests-wp-5x-php-8x-mysql:
    8989    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    90     uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
     90    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
    9191    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    9292    strategy:
     
    111111  upgrade-tests-wp-4x-php-7x-mysql:
    112112    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    113     uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
     113    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
    114114    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    115115    strategy:
     
    138138  upgrade-tests-wp-4x-php-8x-mysql:
    139139    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    140     uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
     140    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
    141141    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    142142    strategy:
Note: See TracChangeset for help on using the changeset viewer.