You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/12/17 17:24:14 UTC

[incubator-nuttx] branch master updated: ci: Use GitHub Actions concurrency for cancelling duplicate jobs

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

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3eec9fc  ci: Use GitHub Actions concurrency for cancelling duplicate jobs
3eec9fc is described below

commit 3eec9fcb9bf637befc4f004a95ac4fc6793d9214
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Fri Dec 17 10:48:15 2021 -0300

    ci: Use GitHub Actions concurrency for cancelling duplicate jobs
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 .github/workflows/build.yml        |  4 ++++
 .github/workflows/cancel.yml       | 17 -----------------
 .github/workflows/check.yml        |  4 ++++
 .github/workflows/doc.yml          |  4 ++++
 .github/workflows/docker_linux.yml |  4 ++++
 .github/workflows/lint.yml         |  4 ++++
 6 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 81da491..b6dcc8f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,6 +24,10 @@ on:
       - 'releases/*'
     tags:
 
+concurrency:
+  group: build-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   Fetch-Source:
     runs-on: ubuntu-latest
diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml
deleted file mode 100644
index 3ac9cc2..0000000
--- a/.github/workflows/cancel.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: Cancelling Duplicates
-on:
-  workflow_run:
-    workflows: ["Build", "Check", "Build Documentation", " Lint", "Docker-Linux"]
-    types: ['requested']
-
-jobs:
-  cancel-duplicate-workflow-runs:
-    name: "Cancel duplicate workflow runs"
-    runs-on: ubuntu-latest
-    steps:
-      - uses: apache/airflow-cancel-workflow-runs@master
-        name: "Cancel duplicate workflow runs"
-        with:
-          cancelMode: allDuplicates
-          token: ${{ secrets.GITHUB_TOKEN }}
-          sourceRunId: ${{ github.event.workflow_run.id }}
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 387af54..4e4d9b2 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -17,6 +17,10 @@ on:
     paths-ignore:
       - 'Documentation/**'
 
+concurrency:
+  group: check-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   check:
     runs-on: ubuntu-18.04
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index b711348..7fb8a09 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -15,6 +15,10 @@ on:
   pull_request:
   push:
 
+concurrency:
+  group: docs-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   build-html:
     runs-on: ubuntu-latest
diff --git a/.github/workflows/docker_linux.yml b/.github/workflows/docker_linux.yml
index 4b272b2..83a7600 100644
--- a/.github/workflows/docker_linux.yml
+++ b/.github/workflows/docker_linux.yml
@@ -30,6 +30,10 @@ on:
 env:
   IMAGE_NAME: apache-nuttx-ci-linux
 
+concurrency:
+  group: docker-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   # Push image to GitHub Packages.
   push:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 3997672..bcb3ca7 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -2,6 +2,10 @@ name: Lint
 
 on: [pull_request]
 
+concurrency:
+  group: lint-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   lint:
     name: Lint