From fa3ec337f5c6e91201b9339ed981c57206fa39e2 Mon Sep 17 00:00:00 2001 From: Or Geva Date: Mon, 22 Nov 2021 04:06:44 -0800 Subject: [PATCH] Cancle old runners in PR content (#475) --- .github/workflows/tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaca1b6e8..5801cbc44 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,11 @@ on: # Triggers the workflow on labeled PRs only. pull_request_target: types: [labeled] +# Ensures that only the latest commit is running for each PR at a time. +# Ignores this rule for push events. +concurrency: + group: ${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true jobs: JFrog-Client-Go-Tests: if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'