Make WordPress Core


Ignore:
Timestamp:
06/30/2022 04:37:20 PM (22 months ago)
Author:
desrosj
Message:

Build/Test Tools: Use the Slack notifications workflow as a reusable one.

This backports several changesets that are required to remove the reliance on the workflow_run event for posting Slack notifications.

The Slack notification workflow will now be called as a reusable one, which has several benefits (see [53591]).

Several other minor GitHub Actions related updates are also being backported in this commit to maintain tooling consistency across branches that still receive security updates as a courtesy when necessary.

Merges [50446], [50473], [50704], [50796], [50930], [51341], [51355], [51498], [51511], [51535], [51924], [51925], [51937], [52002], [52130], [52183], [52233], [53112], [53581], [53582], [53592] to the 5.5 branch.
See #56095.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

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

    r50603 r53600  
    55  push:
    66    branches:
    7       - master
    87      - trunk
    98      - '5.[5-9]'
     
    1413  pull_request:
    1514    branches:
    16       - master
    1715      - trunk
    1816      - '5.[5-9]'
     
    2927  workflow_dispatch:
    3028
     29# Cancels all previous workflow runs for pull requests that have not completed.
     30concurrency:
     31  # The concurrency group contains the workflow name and the branch name for pull requests
     32  # or the commit hash for any other events.
     33  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     34  cancel-in-progress: true
     35
    3136jobs:
    3237
     
    3843  # - Checks out the repository.
    3944  # - Sets up PHP.
    40   # - Logs debug information about the runner container.
     45  # - Logs debug information about the GitHub Action runner.
    4146  # - Installs Composer dependencies (use cache if possible).
    4247  # - Make Composer packages available globally.
    4348  # - Logs PHP_CodeSniffer debug information.
    4449  # - Runs the PHP compatibility tests.
    45   # - todo: Configure Slack notifications for failing scans.
    4650  php-comatibility:
    4751    name: Check PHP compatibility
    4852    runs-on: ubuntu-latest
     53    timeout-minutes: 20
    4954    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    5055
    5156    steps:
    5257      - name: Checkout repository
    53         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
     58        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
    5459
    5560      - name: Set up PHP
    56         uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
     61        uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
    5762        with:
    5863          php-version: '7.4'
     
    6671
    6772      - name: Install Composer dependencies
    68         uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
     73        uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
    6974        with:
    7075          composer-options: "--no-progress --no-ansi --no-interaction"
     
    7883      - name: Run PHP compatibility tests
    7984        run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
     85
     86  slack-notifications:
     87    name: Slack Notifications
     88    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     89    needs: [ php-comatibility ]
     90    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     91    with:
     92      calling_status: ${{ needs.php-compatibility.result == 'success' && 'success' || needs.php-compatibility.result == 'cancelled' && 'cancelled' || 'failure' }}
     93    secrets:
     94      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     95      SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
     96      SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
     97      SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
Note: See TracChangeset for help on using the changeset viewer.