diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 3c9854dc9e16b..9d68d091e91ac 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -49,7 +49,7 @@ jobs: # Runs the PHP coding standards checks. phpcs: name: PHP coding standards - uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk + uses: ./.github/workflows/reusable-coding-standards-php.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -57,14 +57,14 @@ jobs: # Runs the JavaScript coding standards checks. jshint: name: JavaScript coding standards - uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk + uses: ./.github/workflows/reusable-coding-standards-javascript.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index d77e439b2964c..fe516381eb5c1 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -38,7 +38,7 @@ jobs: # Runs the end-to-end test suite. e2e-tests: name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk + uses: ./.github/workflows/reusable-end-to-end-tests.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -51,7 +51,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index f347958e8b4ae..4f3a79aa8fe1f 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -43,7 +43,7 @@ jobs: # Determines the supported values for PHP and database versions based on the WordPress version being tested. build-test-matrix: name: Build Test Matrix - uses: WordPress/wordpress-develop/.github/workflows/reusable-support-json-reader-v1.yml@trunk + uses: ./.github/workflows/reusable-support-json-reader-v1.yml permissions: contents: read secrets: inherit @@ -132,7 +132,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 5872bc5b166c0..e2766e6fa83d1 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -47,14 +47,14 @@ jobs: # Runs the WordPress Core JavaScript tests. test-js: name: QUnit Tests - uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk + uses: ./.github/workflows/reusable-javascript-tests.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/local-docker-environment.yml b/.github/workflows/local-docker-environment.yml index 09b212e90ead5..61676269b170c 100644 --- a/.github/workflows/local-docker-environment.yml +++ b/.github/workflows/local-docker-environment.yml @@ -63,7 +63,7 @@ jobs: # build-test-matrix: name: Build Test Matrix - uses: WordPress/wordpress-develop/.github/workflows/reusable-support-json-reader-v1.yml@trunk + uses: ./.github/workflows/reusable-support-json-reader-v1.yml permissions: contents: read secrets: inherit @@ -74,7 +74,7 @@ jobs: # Tests the local Docker environment. environment-tests-mysql: name: PHP ${{ matrix.php }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-test-local-docker-environment-v1.yml@trunk + uses: ./.github/workflows/reusable-test-local-docker-environment-v1.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -108,7 +108,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index dbb672a30da39..731d1719178df 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -33,7 +33,7 @@ jobs: # Runs the performance test suite. performance: name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk + uses: ./.github/workflows/reusable-performance.yml permissions: contents: read if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }} @@ -50,7 +50,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index eb4163edf38d5..3dbd97b7be732 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -44,14 +44,14 @@ jobs: # Runs PHP compatibility testing. php-compatibility: name: Check PHP compatibility - uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk + uses: ./.github/workflows/reusable-php-compatibility.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 3fe069b709fea..8c5e3257222bf 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -36,7 +36,7 @@ jobs: # test-with-mysql: name: PHP ${{ matrix.php }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read secrets: inherit @@ -107,7 +107,7 @@ jobs: # test-with-mariadb: name: PHP ${{ matrix.php }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read secrets: inherit @@ -157,7 +157,7 @@ jobs: # test-innovation-releases: name: PHP ${{ matrix.php }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read secrets: inherit @@ -200,7 +200,7 @@ jobs: # specific-test-groups: name: ${{ matrix.phpunit-test-groups }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read secrets: inherit @@ -220,7 +220,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/test-and-zip-default-themes.yml b/.github/workflows/test-and-zip-default-themes.yml index c7e7b3012f8f9..8a68016a3156b 100644 --- a/.github/workflows/test-and-zip-default-themes.yml +++ b/.github/workflows/test-and-zip-default-themes.yml @@ -198,7 +198,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index a7b6e2f924650..bd0acbb4567b3 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -31,7 +31,7 @@ jobs: # Tests the WordPress Core build process on multiple operating systems. test-core-build-process: name: Core running from ${{ matrix.directory }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk + uses: ./.github/workflows/reusable-test-core-build-process.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -63,7 +63,7 @@ jobs: # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. test-core-build-process-macos: name: Core running from ${{ matrix.directory }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk + uses: ./.github/workflows/reusable-test-core-build-process.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' }} @@ -79,7 +79,7 @@ jobs: # Tests the Gutenberg plugin build process on multiple operating systems when run within a wordpress-develop checkout. test-gutenberg-build-process: name: Gutenberg running from ${{ matrix.directory }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk + uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} @@ -102,7 +102,7 @@ jobs: # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. test-gutenberg-build-process-macos: name: Gutenberg running from ${{ matrix.directory }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk + uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' }} @@ -117,7 +117,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 3240671b8a29e..4ddfdeae80882 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -49,7 +49,7 @@ jobs: # test-coverage-report: name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report - uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk + uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read if: ${{ github.repository == 'WordPress/wordpress-develop' }} @@ -67,7 +67,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/test-old-branches.yml b/.github/workflows/test-old-branches.yml index 85a7000bcfc8f..29c7aeac25eee 100644 --- a/.github/workflows/test-old-branches.yml +++ b/.github/workflows/test-old-branches.yml @@ -132,7 +132,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 9ee2665b0bd6b..81037ba371c1b 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -57,7 +57,7 @@ jobs: # Tests the full list of PHP/MySQL combinations for the last two versions of WordPress. upgrade-tests-last-two-releases: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} permissions: contents: read @@ -94,7 +94,7 @@ jobs: # Tests the remaining 6.x releases on the oldest and newest supported versions of PHP 7 & 8. upgrade-tests-wp-6x-mysql: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} permissions: contents: read @@ -126,7 +126,7 @@ jobs: # Tests 5.x releases where the WordPress database version changed on the oldest and newest supported versions of PHP 7. upgrade-tests-wp-5x-php-7x-mysql: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} strategy: fail-fast: false @@ -160,7 +160,7 @@ jobs: # - array/string offset with curly braces. upgrade-tests-wp-5x-php-8x-mysql: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} strategy: fail-fast: false @@ -185,7 +185,7 @@ jobs: # The oldest version of WordPress receiving security updates should always be tested. upgrade-tests-wp-4x-php-7x-mysql: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} strategy: fail-fast: false @@ -221,7 +221,7 @@ jobs: # - array/string offset with curly braces. upgrade-tests-wp-4x-php-8x-mysql: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} strategy: fail-fast: false @@ -245,7 +245,7 @@ jobs: # the full list of PHP/MySQL combinations. upgrade-tests-oldest-wp-mysql: name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} - uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk + uses: ./.github/workflows/reusable-upgrade-testing.yml if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} strategy: fail-fast: false @@ -279,7 +279,7 @@ jobs: slack-notifications: name: Slack Notifications - uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk + uses: ./.github/workflows/slack-notifications.yml permissions: actions: read contents: read diff --git a/Gruntfile.js b/Gruntfile.js index 4f8a3d6aa2e76..10b3bcfbabb8d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -456,6 +456,28 @@ module.exports = function(grunt) { } ); } } + }, + 'workflow-references-local-to-remote': { + options: { + processContent: function( src ) { + return src.replace( /uses: \.\/\.github\/workflows\/([^\.]+)\.yml/g, function( match, $1 ) { + return 'uses: WordPress/wordpress-develop/.github/workflows/' + $1 + '.yml@trunk'; + } ); + } + }, + src: '.github/workflows/*.yml', + dest: './' + }, + 'workflow-references-remote-to-local': { + options: { + processContent: function( src ) { + return src.replace( /uses: WordPress\/wordpress-develop\/\.github\/workflows\/([^\.]+)\.yml@trunk/g, function( match, $1 ) { + return 'uses: ./.github/workflows/' + $1 + '.yml'; + } ); + } + }, + src: '.github/workflows/*.yml', + dest: './' } }, sass: { @@ -1513,6 +1535,14 @@ module.exports = function(grunt) { 'copy:version', ] ); + grunt.registerTask( 'replace:workflow-references-local-to-remote', [ + 'copy:workflow-references-local-to-remote', + ]); + + grunt.registerTask( 'replace:workflow-references-remote-to-local', [ + 'copy:workflow-references-remote-to-local', + ]); + /** * Build verification tasks. */