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/02/27 11:36:36 UTC
[incubator-inlong] branch master updated: [INLONG-2753][CI] Add support for pushing docker images when building them (#2758)
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 faa61fc [INLONG-2753][CI] Add support for pushing docker images when building them (#2758)
faa61fc is described below
commit faa61fc6ed457735b9666f5645d7ccfb2aa62b17
Author: Yuanhao Ji <ts...@qq.com>
AuthorDate: Sun Feb 27 19:36:30 2022 +0800
[INLONG-2753][CI] Add support for pushing docker images when building them (#2758)
---
.github/workflows/ci_build_docker.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.github/workflows/ci_build_docker.yml b/.github/workflows/ci_build_docker.yml
index ca3e1c2..0e0d973 100644
--- a/.github/workflows/ci_build_docker.yml
+++ b/.github/workflows/ci_build_docker.yml
@@ -37,6 +37,11 @@ jobs:
java-version: 8
distribution: adopt
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.7
+
- name: Cache Maven packages
uses: actions/cache@v2
with:
@@ -50,3 +55,10 @@ jobs:
run: mvn --batch-mode --update-snapshots -e -V clean package -DskipTests -Pdocker
env:
CI: false
+
+ - name: Push docker image to Docker Hub
+ if: ${{ success() && github.event_name == 'push' && github.ref_name == 'master' && github.repository_owner == 'apache' }}
+ run: sh docker/publish.sh
+ env:
+ DOCKER_USER: ${{ secrets.DOCKER_USER }}
+ DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}