You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/06/25 09:22:10 UTC

[inlong] branch master updated: [INLONG-4769][CI] Fix error trigger condition in the docker workflow (#4770)

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/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ea2ceed3 [INLONG-4769][CI] Fix error trigger condition in the docker workflow (#4770)
8ea2ceed3 is described below

commit 8ea2ceed3ff3a958b3b948f0314c15b1705664d5
Author: Yuanhao Ji <ji...@apache.org>
AuthorDate: Sat Jun 25 17:22:04 2022 +0800

    [INLONG-4769][CI] Fix error trigger condition in the docker workflow (#4770)
---
 .github/workflows/ci_docker.yml | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml
index 0a696f8ad..5fd91a36a 100644
--- a/.github/workflows/ci_docker.yml
+++ b/.github/workflows/ci_docker.yml
@@ -21,12 +21,18 @@ on:
   push:
     paths:
       - '.github/workflows/ci_docker.yml'
-      - '**/Dockerfile'
-      - 'inlong-agent/agent-docker/**'
-      - 'inlong-audit/audit-docker/**'
-      - 'inlong-dataproxy/dataproxy-docker/**'
-      - 'inlong-manager/manager-docker/**'
-      - 'inlong-tubemq/tubemq-docker/**'
+      - '**/pom.xml'
+      - 'inlong-agent/**'
+      - 'inlong-audit/**'
+      - 'inlong-common/**'
+      - 'inlong-dashboard/**'
+      - 'inlong-dataproxy/**'
+      - 'inlong-distribution/**'
+      - 'inlong-manager/**'
+      - 'inlong-sdk/**'
+      - 'inlong-sort/**'
+      - 'inlong-sort-standalone/**'
+      - 'inlong-tubemq/**'
       - '!**.md'
 
   pull_request:
@@ -73,6 +79,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
@@ -85,8 +98,12 @@ jobs:
               echo "::set-output name=match::true"
           fi
 
+      # If only this workflow file is changed, there is no need to publish Docker images.
       - 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: