Make WordPress Core


Ignore:
Timestamp:
03/10/2023 04:07:11 PM (3 years 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.8 branch.
See #55652, #56407, #56528, #54695, #56820, #56816, #56793, #56820, #57572.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/.github/workflows/php-compatibility.yml

    r53597 r55517  
    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'
     
    7274          composer --version
    7375
     76      # This date is used to ensure that the PHP compatibility cache is cleared at least once every week.
     77      # http://man7.org/linux/man-pages/man1/date.1.html
     78      - name: "Get last Monday's date"
     79        id: get-date
     80        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
     81
     82      - name: Cache PHP compatibility scan cache
     83        uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
     84        with:
     85          path: .cache/phpcompat.json
     86          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
     87
    7488      - name: Install Composer dependencies
    75         uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
     89        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    7690        with:
    77           composer-options: "--no-progress --no-ansi --no-interaction"
     91          composer-options: "--no-progress --no-ansi"
    7892
    7993      - name: Make Composer packages available globally
     
    101115      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    102116      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.