Make WordPress Core


Ignore:
Timestamp:
03/07/2023 07:36:29 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.
  • backports some Docker environment related tooling updates for the sake of consistency across branches.

Merges [53628], [53636], [53736], [53737], [53895], [53940], [53947], [54039], [54096], [54108], [54293], [54297], [54313], [54342], [54343], [54371], [54373], [54511], [54649], [54650], [54674], [54678], [54750], [54851], [54852], [54856], [54921], [55152] to the 6.0 branch.
See 55702, #52708, #55652, #55652, #55700, #55652, #56407, #56407, #56528, #55652, #55652, #55652, #54695, #55652, #55652, #55652, #55652, #56820, #56820, #56816, #55652, #55652, #56820, #56793, #56793, #53841, #57148, #57572, #56682.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0/.github/workflows/test-coverage.yml

    r53112 r55482  
    9090      - name: "Get last Monday's date"
    9191        id: get-date
    92         run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"
     92        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    9393
    9494      - name: Get Composer cache directory
    9595        id: composer-cache
    96         run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     96        run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
    9797
    9898      - name: Cache Composer dependencies
     
    101101          cache-name: cache-composer-dependencies
    102102        with:
    103           path: ${{ steps.composer-cache.outputs.dir }}
     103          path: ${{ steps.composer-cache.outputs.composer_dir }}
    104104          key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }}
    105105
     
    182182      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    183183      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     184
     185  failed-workflow:
     186    name: Failed workflow tasks
     187    runs-on: ubuntu-latest
     188    needs: [ test-coverage-report, slack-notifications ]
     189    if: |
     190      always() &&
     191      github.repository == 'WordPress/wordpress-develop' &&
     192      github.event_name != 'pull_request' &&
     193      github.run_attempt < 2 &&
     194      (
     195        needs.test-coverage-report.result == 'cancelled' || needs.test-coverage-report.result == 'failure'
     196      )
     197
     198    steps:
     199      - name: Dispatch workflow run
     200        uses: actions/github-script@d4560e157075e2d93aa3022b5b51a42a880f1f93 # v6.3.0
     201        with:
     202          retries: 2
     203          retry-exempt-status-codes: 418
     204          script: |
     205            github.rest.actions.createWorkflowDispatch({
     206              owner: context.repo.owner,
     207              repo: context.repo.repo,
     208              workflow_id: 'failed-workflow.yml',
     209              ref: 'trunk',
     210              inputs: {
     211                run_id: '${{ github.run_id }}'
     212              }
     213            });
Note: See TracChangeset for help on using the changeset viewer.