Make WordPress Core


Ignore:
Timestamp:
03/10/2023 04:10:01 PM (21 months ago)
Author:
desrosj
Message:

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], [54649], [54650], [54651], [54674], [54750], [54852], [55152], [55487] to the 5.2 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/.github/workflows/coding-standards.yml

    r53603 r55523  
    1010      - '[4-9].[0-9]'
    1111    tags:
    12       - '3.[89]*'
    13       - '[4-9].[0-9]*'
     12      - '[0-9]+.[0-9]'
     13      - '[0-9]+.[0-9].[0-9]+'
     14      - '!3.7.[0-9]+'
    1415  pull_request:
    1516    branches:
     
    2122      - '**.js'
    2223      - '**.php'
    23       # These files configure NPM. Changes could affect the outcome.
     24      # These files configure npm. Changes could affect the outcome.
    2425      - 'package*.json'
    2526      # These files configure Composer. Changes could affect the outcome.
     
    6263    steps:
    6364      - name: Checkout repository
    64         uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
     65        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    6566
    6667      - name: Set up PHP
    67         uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
     68        uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
    6869        with:
    6970          php-version: '7.3'
     
    7778
    7879      - name: Install Composer dependencies
    79         uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
     80        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    8081        with:
    81           composer-options: "--no-progress --no-ansi --no-interaction"
     82          composer-options: "--no-progress --no-ansi"
    8283
    8384      - name: Make Composer packages available globally
     
    9798  # - Checks out the repository.
    9899  # - Logs debug information about the GitHub Action runner.
    99   # - Installs NodeJS.
     100  # - Installs Node.js.
    100101  # - Logs updated debug information.
    101   # _ Installs NPM dependencies.
     102  # _ Installs npm dependencies.
    102103  # - Run the WordPress JSHint checks.
    103104  jshint:
     
    111112    steps:
    112113      - name: Checkout repository
    113         uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
     114        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    114115
    115116      - name: Log debug information
     
    120121          svn --version
    121122
    122       - name: Install NodeJS
    123         uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
     123      - name: Install Node.js
     124        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    124125        with:
    125126          node-version-file: '.nvmrc'
     
    149150      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    150151      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     152
     153  failed-workflow:
     154    name: Failed workflow tasks
     155    runs-on: ubuntu-latest
     156    needs: [ phpcs, jshint, slack-notifications ]
     157    if: |
     158      always() &&
     159      github.repository == 'WordPress/wordpress-develop' &&
     160      github.event_name != 'pull_request' &&
     161      github.run_attempt < 2 &&
     162      (
     163        needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' ||
     164        needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'
     165      )
     166
     167    steps:
     168      - name: Dispatch workflow run
     169        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     170        with:
     171          retries: 2
     172          retry-exempt-status-codes: 418
     173          script: |
     174            github.rest.actions.createWorkflowDispatch({
     175              owner: context.repo.owner,
     176              repo: context.repo.repo,
     177              workflow_id: 'failed-workflow.yml',
     178              ref: 'trunk',
     179              inputs: {
     180                run_id: '${{ github.run_id }}'
     181              }
     182            });
Note: See TracChangeset for help on using the changeset viewer.