diff --git a/.github/workflows/_SOT.yml b/.github/workflows/_SOT.yml index c59c3237330fd8..bd2c1d8b3a9f3f 100644 --- a/.github/workflows/_SOT.yml +++ b/.github/workflows/_SOT.yml @@ -24,6 +24,17 @@ jobs: secrets: github-token: ${{ secrets.GITHUB_TOKEN }} + check-docker: + name: Check SOT Docker + needs: check-bypass + #uses: ./.github/workflows/_docker.yml + with: + docker-image-file: Dockerfile.cuda9_cudnn7_gcc48_py35_centos6 + steps: + run: + bash ci/check_docker_image.sh + + build-and-test: name: Build and Test needs: check-bypass diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml new file mode 100644 index 00000000000000..dbafce267a9932 --- /dev/null +++ b/.github/workflows/_docker.yml @@ -0,0 +1,18 @@ +name: PR-CI-SOT + +on: + workflow_call: + +defaults: + run: + shell: bash + +jobs: + check-docker: + name: Check Docker Image + runs-on: + group: Docker-build + + run: | + bash ./tools/dockerfile/ci_dockerfile.sh + DOCKER_IMAGE=md5sum ${docker-image-file} diff --git a/ci/check_docker_image.sh b/ci/check_docker_image.sh index 697e2d7637b20e..2d1616e10d7e9d 100644 --- a/ci/check_docker_image.sh +++ b/ci/check_docker_image.sh @@ -19,3 +19,15 @@ # bash ci_dockerfile.sh # docker build -t ${docker-image} -f ${dockerfile} . # fi + +echo Dockerfile: ${docker-image-file} +bash tools/dockerfile/ci_dockerfile.sh +docker-md5=`md5sum ${docker-image-file}` +docker-name=ccr-2vdh3abv-pub.cnc.bj.baidubce.com/ci/paddle:${docker-md5} + +set +e + docker pull ${docker-name} +if [ $? -eq 0 ];then + echo use docker +fi +set -e