Build/Test Tools: Backport updates to GitHub Actions.

This backports several changesets to GitHub Actions workflows. These changesets:

- address the deprecated notices related to save-output and set-output to ensure the workflows continue to run after these are removed.
- adds support for automatically retrying a failed workflow once.
- removes workflow files that are not applicable to the branch.
- backports some Docker environment related tooling updates for the sake of consistency across branches. 

Merges [53736], [53737], [53940], [53947], [54039], [54096], [54108], [54293], [54313], [54342], [54343], [54373], [54511], [54650], [54651], [54674], [54750], [54852], [55152], [54651], [55487] to the 4.1 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

git-svn-id: https://develop.svn.wordpress.org/branches/4.1@55535 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2023-03-10 16:31:59 +00:00
parent 8da40037e1
commit 620c9f7468
7 changed files with 181 additions and 51 deletions

4
.env
View File

@ -57,8 +57,8 @@ LOCAL_DB_TYPE=mysql
# #
# Defaults to 5.6 with the assumption that LOCAL_DB_TYPE is set to `mysql` above. # Defaults to 5.6 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
# #
# When using `mysql`, see https://hub.docker.com/_/mysql/ for valid versions. # When using `mysql`, see https://hub.docker.com/r/amd64/mysql for valid versions.
# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions. # When using `mariadb`, see https://hub.docker.com/r/amd64/mariadb for valid versions.
## ##
LOCAL_DB_VERSION=5.6 LOCAL_DB_VERSION=5.6

View File

@ -9,8 +9,9 @@ on:
- '3.[89]' - '3.[89]'
- '[4-9].[0-9]' - '[4-9].[0-9]'
tags: tags:
- '3.[89]*' - '[0-9]+.[0-9]'
- '[4-9].[0-9]*' - '[0-9]+.[0-9].[0-9]+'
- '!3.7.[0-9]+'
pull_request: pull_request:
branches: branches:
- trunk - trunk
@ -20,7 +21,7 @@ on:
# Any change to a PHP or JavaScript file should run checks. # Any change to a PHP or JavaScript file should run checks.
- '**.js' - '**.js'
- '**.php' - '**.php'
# These files configure NPM. Changes could affect the outcome. # These files configure npm. Changes could affect the outcome.
- 'package*.json' - 'package*.json'
# These files configure Composer. Changes could affect the outcome. # These files configure Composer. Changes could affect the outcome.
- 'composer.*' - 'composer.*'
@ -49,7 +50,7 @@ jobs:
# - Logs debug information about the GitHub Action runner. # - Logs debug information about the GitHub Action runner.
# - Installs NodeJS. # - Installs NodeJS.
# - Logs updated debug information. # - Logs updated debug information.
# _ Installs NPM dependencies. # _ Installs npm dependencies.
# - Run the WordPress JSHint checks. # - Run the WordPress JSHint checks.
jshint: jshint:
name: JavaScript coding standards name: JavaScript coding standards
@ -61,7 +62,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Log debug information - name: Log debug information
run: | run: |
@ -70,8 +71,8 @@ jobs:
git --version git --version
svn --version svn --version
- name: Install NodeJS - name: Set up Node.js
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: npm cache: npm
@ -99,3 +100,33 @@ jobs:
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
needs: [ jshint, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'
)
steps:
- name: Dispatch workflow run
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});

View File

@ -8,8 +8,9 @@ on:
- '3.[89]' - '3.[89]'
- '[4-9].[0-9]' - '[4-9].[0-9]'
tags: tags:
- '3.[89]*' - '[0-9]+.[0-9]'
- '[4-9].[0-9]*' - '[0-9]+.[0-9].[0-9]+'
- '!3.7.[0-9]+'
pull_request: pull_request:
branches: branches:
- trunk - trunk
@ -18,7 +19,7 @@ on:
paths: paths:
# Any change to a JavaScript file should run tests. # Any change to a JavaScript file should run tests.
- '**.js' - '**.js'
# These files configure NPM. Changes could affect the outcome. # These files configure npm. Changes could affect the outcome.
- 'package*.json' - 'package*.json'
# This file configures ESLint. Changes could affect the outcome. # This file configures ESLint. Changes could affect the outcome.
- '.eslintignore' - '.eslintignore'
@ -45,7 +46,7 @@ jobs:
# - Logs debug information about the GitHub Action runner. # - Logs debug information about the GitHub Action runner.
# - Installs NodeJS. # - Installs NodeJS.
# - Logs updated debug information. # - Logs updated debug information.
# _ Installs NPM dependencies. # _ Installs npm dependencies.
# - Run the WordPress QUnit tests. # - Run the WordPress QUnit tests.
test-js: test-js:
name: QUnit Tests name: QUnit Tests
@ -55,7 +56,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Log debug information - name: Log debug information
run: | run: |
@ -64,8 +65,8 @@ jobs:
git --version git --version
svn --version svn --version
- name: Install NodeJS - name: Set up Node.js
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: npm cache: npm
@ -93,3 +94,33 @@ jobs:
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
needs: [ test-js, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.test-js.result == 'cancelled' || needs.test-js.result == 'failure'
)
steps:
- name: Dispatch workflow run
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});

View File

@ -7,8 +7,8 @@ on:
- '3.[7-9]' - '3.[7-9]'
- '[4-9].[0-9]' - '[4-9].[0-9]'
tags: tags:
- '3.[7-9]*' - '[0-9]+.[0-9]'
- '[4-9].[0-9]*' - '[0-9]+.[0-9].[0-9]+'
pull_request: pull_request:
branches: branches:
- trunk - trunk
@ -30,7 +30,7 @@ env:
LOCAL_DIR: build LOCAL_DIR: build
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
COMPOSER_INSTALL: ${{ false }} COMPOSER_INSTALL: ${{ false }}
# Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`. # Controls which npm script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
PHPUNIT_SCRIPT: php PHPUNIT_SCRIPT: php
LOCAL_PHP_MEMCACHED: ${{ false }} LOCAL_PHP_MEMCACHED: ${{ false }}
@ -42,7 +42,7 @@ jobs:
# - Checks out the repository. # - Checks out the repository.
# - Logs debug information about the GitHub Action runner. # - Logs debug information about the GitHub Action runner.
# - Installs NodeJS. # - Installs NodeJS.
# _ Installs NPM dependencies. # _ Installs npm dependencies.
# - Builds WordPress to run from the `build` directory. # - Builds WordPress to run from the `build` directory.
# - Creates a ZIP file of compiled WordPress. # - Creates a ZIP file of compiled WordPress.
# - Uploads ZIP file as an artifact. # - Uploads ZIP file as an artifact.
@ -53,7 +53,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Log debug information - name: Log debug information
run: | run: |
@ -68,8 +68,8 @@ jobs:
php -i php -i
locale -a locale -a
- name: Install NodeJS - name: Set up Node.js
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: npm cache: npm
@ -81,13 +81,13 @@ jobs:
run: npm run build run: npm run build
- name: Create ZIP artifact - name: Create ZIP artifact
uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657 # v0.6.2 uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # v0.7.1
with: with:
filename: built-wp-${{ github.sha }}.zip filename: built-wp-${{ github.sha }}.zip
exclusions: '*.git* /*node_modules/* packagehash.txt' exclusions: '*.git* /*node_modules/* packagehash.txt'
- name: Upload build artifact - name: Upload build artifact
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with: with:
name: built-wp-${{ github.sha }} name: built-wp-${{ github.sha }}
path: built-wp-${{ github.sha }}.zip path: built-wp-${{ github.sha }}.zip
@ -101,7 +101,7 @@ jobs:
# - Downloads the built WordPress artifact from the previous job. # - Downloads the built WordPress artifact from the previous job.
# - Unzips the artifact. # - Unzips the artifact.
# - Installs NodeJS. # - Installs NodeJS.
# _ Installs NPM dependencies. # _ Installs npm dependencies.
# - Configures caching for Composer. # - Configures caching for Composer.
# _ Installs Composer dependencies (if desired). # _ Installs Composer dependencies (if desired).
# - Logs Docker debug information (about the Docker installation within the runner). # - Logs Docker debug information (about the Docker installation within the runner).
@ -168,15 +168,15 @@ jobs:
echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
- name: Download the built WordPress artifact - name: Download the built WordPress artifact
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0 uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with: with:
name: built-wp-${{ github.sha }} name: built-wp-${{ github.sha }}
- name: Unzip built artifact - name: Unzip built artifact
run: unzip built-wp-${{ github.sha }}.zip run: unzip built-wp-${{ github.sha }}.zip
- name: Install NodeJS - name: Set up Node.js
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: npm cache: npm
@ -186,7 +186,7 @@ jobs:
- name: Cache Composer dependencies - name: Cache Composer dependencies
if: ${{ env.COMPOSER_INSTALL == true }} if: ${{ env.COMPOSER_INSTALL == true }}
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
env: env:
cache-name: cache-composer-dependencies cache-name: cache-composer-dependencies
with: with:
@ -263,7 +263,7 @@ jobs:
- name: Checkout the WordPress Test Reporter - name: Checkout the WordPress Test Reporter
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with: with:
repository: 'WordPress/phpunit-test-runner' repository: 'WordPress/phpunit-test-runner'
path: 'test-runner' path: 'test-runner'
@ -294,3 +294,33 @@ jobs:
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
needs: [ test-php, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure'
)
steps:
- name: Dispatch workflow run
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});

View File

@ -1,4 +1,4 @@
name: Test NPM name: Test npm
on: on:
push: push:
@ -6,17 +6,20 @@ on:
- trunk - trunk
- '3.[7-9]' - '3.[7-9]'
- '[4-9].[0-9]' - '[4-9].[0-9]'
tags:
- '[0-9]+.[0-9]'
- '[0-9]+.[0-9].[0-9]+'
pull_request: pull_request:
branches: branches:
- trunk - trunk
- '3.[7-9]' - '3.[7-9]'
- '[4-9].[0-9]' - '[4-9].[0-9]'
paths: paths:
# These files configure NPM. Changes could affect the outcome. # These files configure npm. Changes could affect the outcome.
- 'package*.json' - 'package*.json'
# JavaScript files are built using NPM. # JavaScript files are built using npm.
- '**.js' - '**.js'
# CSS and SCSS files are built using NPM. # CSS and SCSS files are built using npm.
- '**.scss' - '**.scss'
- '**.css' - '**.css'
# Changes to workflow files should always verify all workflows are successful. # Changes to workflow files should always verify all workflows are successful.
@ -34,18 +37,18 @@ env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
jobs: jobs:
# Verifies that installing NPM dependencies and building WordPress works as expected. # Verifies that installing npm dependencies and building WordPress works as expected.
# #
# Performs the following steps: # Performs the following steps:
# - Checks out the repository. # - Checks out the repository.
# - Logs debug information about the GitHub Action runner. # - Logs debug information about the GitHub Action runner.
# - Installs NodeJS. # - Installs NodeJS.
# - Sets up caching for NPM. # - Sets up caching for npm.
# _ Installs NPM dependencies. # _ Installs npm dependencies.
# - Builds WordPress to run from the `build` directory. # - Builds WordPress to run from the `build` directory.
# - Cleans up after building WordPress to the `build` directory. # - Cleans up after building WordPress to the `build` directory.
test-npm: test-npm:
name: Test NPM on ${{ matrix.os }} name: Test npm on ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 20 timeout-minutes: 20
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
@ -55,7 +58,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Log debug information - name: Log debug information
run: | run: |
@ -65,8 +68,8 @@ jobs:
git --version git --version
svn --version svn --version
- name: Install NodeJS - name: Set up Node.js
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: npm cache: npm
@ -80,25 +83,30 @@ jobs:
- name: Clean after building - name: Clean after building
run: npm run grunt clean run: npm run grunt clean
# Verifies that installing NPM dependencies and building WordPress works as expected on MacOS. # Verifies that installing npm dependencies and building WordPress works as expected on MacOS.
# #
# This is separate from the job above in order to use stricter conditions about when to run. # This is separate from the job above in order to use stricter conditions about when to run.
# This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
# #
# The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
# currently no way to determine the OS being used on a given job.
# See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
#
# Performs the following steps: # Performs the following steps:
# - Checks out the repository. # - Checks out the repository.
# - Logs debug information about the GitHub Action runner. # - Logs debug information about the GitHub Action runner.
# - Installs NodeJS. # - Installs NodeJS.
# _ Installs NPM dependencies. # _ Installs npm dependencies.
# - Builds WordPress to run from the `build` directory. # - Builds WordPress to run from the `build` directory.
# - Cleans up after building WordPress to the `build` directory. # - Cleans up after building WordPress to the `build` directory.
test-npm-macos: test-npm-macos:
name: Test NPM on MacOS name: Test npm on MacOS
runs-on: macos-latest runs-on: macos-latest
timeout-minutes: 30
if: ${{ github.repository == 'WordPress/wordpress-develop' }} if: ${{ github.repository == 'WordPress/wordpress-develop' }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Log debug information - name: Log debug information
run: | run: |
@ -108,8 +116,8 @@ jobs:
git --version git --version
svn --version svn --version
- name: Install NodeJS - name: Set up Node.js
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: npm cache: npm
@ -135,3 +143,34 @@ jobs:
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
needs: [ test-npm, test-npm-macos, slack-notifications ]
if: |
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_attempt < 2 &&
(
needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' ||
needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'
)
steps:
- name: Dispatch workflow run
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
with:
retries: 2
retry-exempt-status-codes: 418
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'failed-workflow.yml',
ref: 'trunk',
inputs: {
run_id: '${{ github.run_id }}'
}
});

View File

@ -12,9 +12,8 @@ jobs:
if: ${{ github.repository == 'WordPress/wordpress-develop' }} if: ${{ github.repository == 'WordPress/wordpress-develop' }}
steps: steps:
- uses: bubkoo/welcome-action@8dbbac2540d155744c90e4e37da6b05ffc9c5e2c # v1.0.3 - uses: wow-actions/welcome@72817eb31cda1de60f51893d80e2e82ce57f7e76 # v1.3.0
with: with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FIRST_PR_COMMENT: > FIRST_PR_COMMENT: >
Hi @{{ author }}! 👋 Hi @{{ author }}! 👋

View File

@ -53,7 +53,7 @@ services:
# The MySQL container. # The MySQL container.
## ##
mysql: mysql:
image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-5.6} image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-5.6}
networks: networks:
- wpdevnet - wpdevnet