Make WordPress Core


Ignore:
Timestamp:
03/10/2023 03:52:41 PM (19 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.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9/.github/workflows/php-compatibility.yml

    r53596 r55516  
    99      - '[6-9].[0-9]'
    1010    tags:
    11       - '5.[5-9]*'
    12       - '[6-9].[0-9]*'
     11      - '[0-9]+.[0-9]'
     12      - '[0-9]+.[0-9].[0-9]+'
     13      - '![34].[0-9].[0-9]+'
     14      - '!5.[0-4].[0-9]+'
    1315  pull_request:
    1416    branches:
     
    5860    steps:
    5961      - name: Checkout repository
    60         uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
     62        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    6163
    6264      - name: Set up PHP
    63         uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
     65        uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
    6466        with:
    6567          php-version: '7.4'
     
    7678      - name: "Get last Monday's date"
    7779        id: get-date
    78         run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"
     80        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    7981
    8082      - name: Cache PHP compatibility scan cache
    81         uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
     83        uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    8284        with:
    8385          path: .cache/phpcompat.json
     
    8587
    8688      - name: Install Composer dependencies
    87         uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
     89        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    8890        with:
    89           composer-options: "--no-progress --no-ansi --no-interaction"
     91          composer-options: "--no-progress --no-ansi"
    9092
    9193      - name: Make Composer packages available globally
     
    113115      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    114116      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     117
     118  failed-workflow:
     119    name: Failed workflow tasks
     120    runs-on: ubuntu-latest
     121    needs: [ php-compatibility, slack-notifications ]
     122    if: |
     123      always() &&
     124      github.repository == 'WordPress/wordpress-develop' &&
     125      github.event_name != 'pull_request' &&
     126      github.run_attempt < 2 &&
     127      (
     128        needs.php-compatibility.result == 'cancelled' || needs.php-compatibility.result == 'failure'
     129      )
     130
     131    steps:
     132      - name: Dispatch workflow run
     133        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     134        with:
     135          retries: 2
     136          retry-exempt-status-codes: 418
     137          script: |
     138            github.rest.actions.createWorkflowDispatch({
     139              owner: context.repo.owner,
     140              repo: context.repo.repo,
     141              workflow_id: 'failed-workflow.yml',
     142              ref: 'trunk',
     143              inputs: {
     144                run_id: '${{ github.run_id }}'
     145              }
     146            });
Note: See TracChangeset for help on using the changeset viewer.