From 2652c73a4fabd7bb85916e99c289dc58cad8f895 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 25 Feb 2022 13:34:28 +0800 Subject: [PATCH] GHA CI: cancel outdated in-progress workflow runs This will only cancel outdated workflow runs on PR branches and won't affect other normal repo branches. PR #16511. --- .github/workflows/ci_file_health.yaml | 4 ++++ .github/workflows/ci_macos.yaml | 5 +++++ .github/workflows/ci_ubuntu.yaml | 5 +++++ .github/workflows/ci_webui.yaml | 4 ++++ .github/workflows/ci_windows.yaml | 5 +++++ 5 files changed, 23 insertions(+) diff --git a/.github/workflows/ci_file_health.yaml b/.github/workflows/ci_file_health.yaml index 739a7ea46..0732f35aa 100644 --- a/.github/workflows/ci_file_health.yaml +++ b/.github/workflows/ci_file_health.yaml @@ -2,6 +2,10 @@ name: CI - File health on: [pull_request, push] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: ${{ github.head_ref != '' }} + jobs: ci: name: Check diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 287a1b9fe..82150bc94 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -1,6 +1,11 @@ name: CI - macOS + on: [pull_request, push] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: ${{ github.head_ref != '' }} + jobs: ci: name: Build diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index f34adc5e9..762795a81 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -1,6 +1,11 @@ name: CI - Ubuntu + on: [pull_request, push] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: ${{ github.head_ref != '' }} + jobs: ci: name: Build diff --git a/.github/workflows/ci_webui.yaml b/.github/workflows/ci_webui.yaml index 0c234b270..835e86fc4 100644 --- a/.github/workflows/ci_webui.yaml +++ b/.github/workflows/ci_webui.yaml @@ -2,6 +2,10 @@ name: CI - WebUI on: [pull_request, push] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: ${{ github.head_ref != '' }} + jobs: ci: name: Check diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index fc64ab11f..813e8047c 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -1,6 +1,11 @@ name: CI - Windows + on: [pull_request, push] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: ${{ github.head_ref != '' }} + jobs: ci: name: Build