Make WordPress Core

Changeset 54679


Ignore:
Timestamp:
10/24/2022 04:51:12 PM (17 months ago)
Author:
desrosj
Message:

Build/Test Tools: Remove use of set-output in Action workflows.

The save-state and set-output commands have been deprecated in GitHub Actions. This removes all occurrences of the command within workflow steps.

This will not remove all deprecated notices from workflow summaries (some third-party actions still contain instances of these commands and need to be fixed upstream), but it will fix the notices caused by custom workflow code.

Merges [54649] to the 6.1 branch.
Props jrf.
See #56820.

Location:
branches/6.1
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/6.1

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

    r54511 r54679  
    8383      - name: "Get last Monday's date"
    8484        id: get-date
    85         run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"
     85        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    8686
    8787      - name: Cache PHPCS scan cache
  • branches/6.1/.github/workflows/php-compatibility.yml

    r54511 r54679  
    7878      - name: "Get last Monday's date"
    7979        id: get-date
    80         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
    8181
    8282      - name: Cache PHP compatibility scan cache
  • branches/6.1/.github/workflows/phpunit-tests.yml

    r54511 r54679  
    122122      - name: "Get last Monday's date"
    123123        id: get-date
    124         run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"
     124        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    125125
    126126      - name: Get Composer cache directory
    127127        id: composer-cache
    128         run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     128        run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
    129129
    130130      - name: Cache Composer dependencies
     
    133133          cache-name: cache-composer-dependencies
    134134        with:
    135           path: ${{ steps.composer-cache.outputs.dir }}
     135          path: ${{ steps.composer-cache.outputs.composer_dir }}
    136136          key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }}
    137137
  • branches/6.1/.github/workflows/slack-notifications.yml

    r54511 r54679  
    115115      - name: Store previous conclusion as an output
    116116        id: previous-conclusion
    117         run: echo "::set-output name=previous_conclusion::${{ steps.previous-attempt-result.outputs.result }}"
     117        run: echo "previous_conclusion=${{ steps.previous-attempt-result.outputs.result }}" >> $GITHUB_OUTPUT
    118118
    119119      - name: Get the commit message
     
    139139          EOF
    140140          )
    141           echo "::set-output name=commit_message_escaped::${COMMIT_MESSAGE}"
     141          echo "commit_message_escaped=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT
    142142
    143143      - name: Construct payload and store as an output
    144144        id: create-payload
    145         run: echo "::set-output name=payload::{\"workflow_name\":\"${{ github.workflow }}\",\"ref_name\":\"${{ env.CURRENT_BRANCH }}\",\"run_url\":\"https://github.com/WordPress/wordpress-develop/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}\",\"commit_message\":\"${{ steps.commit-message.outputs.commit_message_escaped }}\"}"
     145        run: echo "payload={\"workflow_name\":\"${{ github.workflow }}\",\"ref_name\":\"${{ env.CURRENT_BRANCH }}\",\"run_url\":\"https://github.com/WordPress/wordpress-develop/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}\",\"commit_message\":\"${{ steps.commit-message.outputs.commit_message_escaped }}\"}" >> $GITHUB_OUTPUT
    146146
    147147  # Posts notifications when a workflow fails.
  • branches/6.1/.github/workflows/test-coverage.yml

    r54511 r54679  
    100100      - name: "Get last Monday's date"
    101101        id: get-date
    102         run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")"
     102        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    103103
    104104      - name: Get Composer cache directory
    105105        id: composer-cache
    106         run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     106        run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
    107107
    108108      - name: Cache Composer dependencies
     
    111111          cache-name: cache-composer-dependencies
    112112        with:
    113           path: ${{ steps.composer-cache.outputs.dir }}
     113          path: ${{ steps.composer-cache.outputs.composer_dir }}
    114114          key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }}
    115115
Note: See TracChangeset for help on using the changeset viewer.