This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new a6c183d2a [INLONG-4653][CI] Add concurrency support on GitHub Actions
(#4654)
a6c183d2a is described below
commit a6c183d2a709bfeacd2165a93d3699e093a73480
Author: Yuanhao Ji <[email protected]>
AuthorDate: Wed Jun 15 09:43:14 2022 +0800
[INLONG-4653][CI] Add concurrency support on GitHub Actions (#4654)
---
.github/workflows/ci_build.yml | 4 ++++
.github/workflows/ci_chart_test.yml | 4 ++++
.github/workflows/ci_check_license.yml | 4 ++++
.github/workflows/ci_docker.yml | 16 +++++++++++++++-
.github/workflows/ci_ut.yml | 4 ++++
5 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml
index dda61fb59..8cbc00420 100644
--- a/.github/workflows/ci_build.yml
+++ b/.github/workflows/ci_build.yml
@@ -52,6 +52,10 @@ on:
- 'inlong-tubemq/**'
- '!**.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
build:
name: Build
diff --git a/.github/workflows/ci_chart_test.yml
b/.github/workflows/ci_chart_test.yml
index dabf18b2a..80ffc48ac 100644
--- a/.github/workflows/ci_chart_test.yml
+++ b/.github/workflows/ci_chart_test.yml
@@ -40,6 +40,10 @@ env:
CT_CONFIG_PATH: '.github/ct.yml'
KIND_CONFIG_PATH: '.github/kind.yml'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
chart-test:
name: Lint and test charts
diff --git a/.github/workflows/ci_check_license.yml
b/.github/workflows/ci_check_license.yml
index 64846918f..c451f6756 100644
--- a/.github/workflows/ci_check_license.yml
+++ b/.github/workflows/ci_check_license.yml
@@ -19,6 +19,10 @@ name: InLong Check License Header
on: [ push, pull_request ]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
check-license:
name: Check license header
diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml
index 0a696f8ad..d174918ca 100644
--- a/.github/workflows/ci_docker.yml
+++ b/.github/workflows/ci_docker.yml
@@ -40,6 +40,10 @@ on:
- 'inlong-tubemq/tubemq-docker/**'
- '!**.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
docker:
name: Docker build and push
@@ -73,6 +77,13 @@ jobs:
env:
CI: false
+ # Check if only the workflow file is changed.
+ - name: Check workflow diff
+ id: check-workflow-diff
+ uses: apache/pulsar-test-infra/diff-only@master
+ with:
+ args: .github/workflows/ci_docker.yml
+
# If the changes are being pushed to the master branch or a branch like
'release-1.0.0', this step will output true.
- name: Match branch
id: match-branch
@@ -86,7 +97,10 @@ jobs:
fi
- name: Push Docker images to Docker Hub
- if: ${{ success() && steps.match-branch.outputs.match == 'true' }}
+ if: |
+ success()
+ && steps.check-workflow-diff.outputs.changed_only == 'no'
+ && steps.match-branch.outputs.match == 'true'
working-directory: docker
run: bash +x publish.sh
env:
diff --git a/.github/workflows/ci_ut.yml b/.github/workflows/ci_ut.yml
index ef365491c..9f8e6dc65 100644
--- a/.github/workflows/ci_ut.yml
+++ b/.github/workflows/ci_ut.yml
@@ -52,6 +52,10 @@ on:
- 'inlong-tubemq/**'
- '!**.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
unit-test:
name: Unit Test