Githubactions - Cancel workflow on new commits in the same PR (#1028)

This commit is contained in:
SaW
2025-02-26 16:44:44 +01:00
committed by GitHub
parent 3a4e8e729b
commit c697b81404
4 changed files with 17 additions and 5 deletions

View File

@@ -6,6 +6,10 @@ on:
pull_request: pull_request:
branches: [ "master" ] branches: [ "master" ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs: jobs:
lint: lint:
name: "clang-format-always-success" name: "clang-format-always-success"
@@ -27,4 +31,4 @@ jobs:
# Check if there are any formatting changes # Check if there are any formatting changes
git diff --exit-code git diff --exit-code
shell: bash shell: bash
continue-on-error: true continue-on-error: true

View File

@@ -6,6 +6,10 @@ on:
pull_request: pull_request:
branches: [ "master" ] branches: [ "master" ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs: jobs:
build: build:
strategy: strategy:

View File

@@ -5,9 +5,9 @@ on:
pull_request: pull_request:
branches: [ "master" ] branches: [ "master" ]
# concurrency: concurrency:
# group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) group: ${{ github.head_ref || github.run_id }}
# cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
macos-build: macos-build:
@@ -42,4 +42,4 @@ jobs:
- name: Configure OS - name: Configure OS
run: source ./acore.sh install-deps run: source ./acore.sh install-deps
- name: Build - name: Build
run: source ./apps/ci/mac/ci-compile.sh run: source ./apps/ci/mac/ci-compile.sh

View File

@@ -5,6 +5,10 @@ on:
pull_request: pull_request:
branches: [ "master" ] branches: [ "master" ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs: jobs:
windows-build: windows-build:
strategy: strategy: