Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-4769][CI] Fix error trigger condition in the docker workflow #4770

Merged
merged 1 commit into from
Jun 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/workflows/ci_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down