Skip to content

Commit 1dc2eae

Browse files
committed
[INLONG-4769] Fix error trigger condition
issue: apache#4769
1 parent d6c33dc commit 1dc2eae

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.github/workflows/ci_docker.yml

+24-7
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ on:
2121
push:
2222
paths:
2323
- '.github/workflows/ci_docker.yml'
24-
- '**/Dockerfile'
25-
- 'inlong-agent/agent-docker/**'
26-
- 'inlong-audit/audit-docker/**'
27-
- 'inlong-dataproxy/dataproxy-docker/**'
28-
- 'inlong-manager/manager-docker/**'
29-
- 'inlong-tubemq/tubemq-docker/**'
24+
- '**/pom.xml'
25+
- 'inlong-agent/**'
26+
- 'inlong-audit/**'
27+
- 'inlong-common/**'
28+
- 'inlong-dashboard/**'
29+
- 'inlong-dataproxy/**'
30+
- 'inlong-distribution/**'
31+
- 'inlong-manager/**'
32+
- 'inlong-sdk/**'
33+
- 'inlong-sort/**'
34+
- 'inlong-sort-standalone/**'
35+
- 'inlong-tubemq/**'
3036
- '!**.md'
3137

3238
pull_request:
@@ -73,6 +79,13 @@ jobs:
7379
env:
7480
CI: false
7581

82+
# Check if only the workflow file is changed.
83+
- name: Check workflow diff
84+
id: check-workflow-diff
85+
uses: apache/pulsar-test-infra/diff-only@master
86+
with:
87+
args: .github/workflows/ci_docker.yml
88+
7689
# If the changes are being pushed to the master branch or a branch like 'release-1.0.0', this step will output true.
7790
- name: Match branch
7891
id: match-branch
@@ -85,8 +98,12 @@ jobs:
8598
echo "::set-output name=match::true"
8699
fi
87100
101+
# If only this workflow file is changed, there is no need to publish Docker images.
88102
- name: Push Docker images to Docker Hub
89-
if: ${{ success() && steps.match-branch.outputs.match == 'true' }}
103+
if: |
104+
success()
105+
&& steps.check-workflow-diff.outputs.changed_only == 'no'
106+
&& steps.match-branch.outputs.match == 'true'
90107
working-directory: docker
91108
run: bash +x publish.sh
92109
env:

0 commit comments

Comments
 (0)