From fa63c36a5cac25616415c1b7e0bbd34648132e8c Mon Sep 17 00:00:00 2001 From: Watson Date: Tue, 29 Oct 2024 18:33:00 +0900 Subject: [PATCH] Backport(v1.16): ci: add cancel-in-progress setting (#4689) Often I forget to Signed-off and push new commit again. I would like the github action related to the PR to be automatically cancelled at that time. I want the test to run on the newly pushed commit immediately. Ref. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs Signed-off-by: Shizuo Fujita Signed-off-by: Kentaro Hayashi --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2f56d783a..628991c115 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,10 @@ on: - '*.md' - 'lib/fluent/version.rb' +concurrency: + group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + jobs: test: runs-on: ${{ matrix.os }}