From 71bea88422c64f353da85f66667c908a1b7b37e6 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Thu, 28 Dec 2023 18:42:35 -0300 Subject: [PATCH] ci/cl: fix to run cancel previous build only on pull request branchs --- .github/workflows/build-docker.yml | 9 +-------- .github/workflows/build-ubuntu.yml | 2 +- .github/workflows/build-windows-cmake.yml | 2 +- .github/workflows/build-windows-solution.yml | 2 +- .github/workflows/clang-lint.yml | 2 +- .github/workflows/cron-stale.yml | 2 +- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index c1a4a77af7b..d99ba82878c 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -16,7 +16,7 @@ on: jobs: cancel-runs: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Cancel Previous Runs @@ -90,13 +90,6 @@ jobs: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} runs-on: ubuntu-latest steps: - - name: Cancel Previous Runs - if: github.ref != 'refs/heads/main' - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: "same_content" - cancel_others: true - - name: Checkout uses: actions/checkout@main with: diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index e0ea11220fb..cdc54dc33f2 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -20,7 +20,7 @@ env: jobs: cancel-runs: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Cancel Previous Runs diff --git a/.github/workflows/build-windows-cmake.yml b/.github/workflows/build-windows-cmake.yml index caba8a0aa90..ab0accc857b 100644 --- a/.github/workflows/build-windows-cmake.yml +++ b/.github/workflows/build-windows-cmake.yml @@ -17,7 +17,7 @@ env: MAKEFLAGS: "-j 2" jobs: cancel-runs: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Cancel Previous Runs diff --git a/.github/workflows/build-windows-solution.yml b/.github/workflows/build-windows-solution.yml index 9e3addb6e74..58dcf97f159 100644 --- a/.github/workflows/build-windows-solution.yml +++ b/.github/workflows/build-windows-solution.yml @@ -20,7 +20,7 @@ env: jobs: cancel-runs: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Cancel Previous Runs diff --git a/.github/workflows/clang-lint.yml b/.github/workflows/clang-lint.yml index 85699e408c9..67e6427d853 100644 --- a/.github/workflows/clang-lint.yml +++ b/.github/workflows/clang-lint.yml @@ -10,7 +10,7 @@ on: - "src/**" jobs: cancel-runs: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Cancel Previous Runs diff --git a/.github/workflows/cron-stale.yml b/.github/workflows/cron-stale.yml index b4231144943..3c68d50a247 100644 --- a/.github/workflows/cron-stale.yml +++ b/.github/workflows/cron-stale.yml @@ -6,7 +6,7 @@ on: jobs: cancel-runs: - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Cancel Previous Runs