Make WordPress Core


Ignore:
Timestamp:
05/19/2021 05:36:54 PM (3 years ago)
Author:
desrosj
Message:

Build/Test Tools: Use the new concurrency setting for GitHub Actions.

The new concurrency setting can be used to ensure only a single workflow run or job is in progress. When used in combination with the cancel-in-progress setting, incomplete workflow runs can be cancelled automatically to prevent running workflows unnecessarily.

The workflows that take longer to run previously had this built into a step and utilized a 3rd-party action. Now that this is natively supported by GitHub Actions, using that is preferred.

This option is currently in beta, but is stable enough to use in our workflows for the time being.

Props ocean90.
Fixes #53080.

File:
1 edited

Legend:

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

    r50590 r50930  
    2828      - '.github/workflows/*.yml'
    2929  workflow_dispatch:
     30
     31# Cancels all previous workflow runs for pull requests that have not completed.
     32concurrency:
     33  # The concurrency group contains the workflow name and the branch name for pull requests
     34  # or the commit hash for any other events.
     35  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     36  cancel-in-progress: true
    3037
    3138jobs:
Note: See TracChangeset for help on using the changeset viewer.