This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new e6a9fe2fa ORC-1375: Cancel old running ci tasks when a pr has a new 
commit
e6a9fe2fa is described below

commit e6a9fe2fa6173aafeda82d164532f2c648c2dac3
Author: Yiqun Zhang <[email protected]>
AuthorDate: Sun Feb 19 22:25:59 2023 -0800

    ORC-1375: Cancel old running ci tasks when a pr has a new commit
    
    ### What changes were proposed in this pull request?
    
    This pr is aimed to cancel old running ci tasks when a pr has a new commit.
    
    ### Why are the changes needed?
    
    The old tasks were based on outdated code which wasted resources and was 
pointless. Canceling tasks makes for a more efficient use of resources.
    
    ### How was this patch tested?
    
    It doesn't seem to work immediately before merging, I verified this in 
other project.
    
    Closes #1415 from guiyanakuang/cancel_obsolete_test.
    
    Authored-by: Yiqun Zhang <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .github/workflows/build_and_test.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/build_and_test.yml 
b/.github/workflows/build_and_test.yml
index 8505235ef..1b1b8ff18 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -14,6 +14,11 @@ on:
     branches:
     - main
 
+# Cancel previous PR build and test
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && 
github.event.number || github.sha }}
+  cancel-in-progress: true
+
 jobs:
   build:
     name: "Java ${{ matrix.java }} and ${{ matrix.cxx }} on ${{ matrix.os }}"

Reply via email to