diff --git a/.github/workflows/docker_push.yml b/.github/workflows/docker_push.yml index 41abbe3..08a7395 100644 --- a/.github/workflows/docker_push.yml +++ b/.github/workflows/docker_push.yml @@ -8,6 +8,7 @@ on: push: branches: - main + - add-curl-check-before-pushing-image # to be cleaned up before merging jobs: docker_push: @@ -25,4 +26,15 @@ jobs: - run: | aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/doctolib cd neurow - docker buildx build . --build-arg GIT_COMMIT_SHA1=${{ github.event.pull_request.head.sha || github.event.after || github.sha }} --push -t public.ecr.aws/doctolib/neurow:latest -t public.ecr.aws/doctolib/neurow:latest -t public.ecr.aws/doctolib/neurow:${{ github.event.pull_request.head.sha || github.event.after || github.sha }} + docker buildx build . --build-arg GIT_COMMIT_SHA1=${{ github.event.pull_request.head.sha || github.event.after || github.sha }} --load -t neurow:test + + docker run -d --name neurow_test neurow:test + + sleep 5 + + # Check if API is responding to requests + + # Push if responding, exit with error otherwise + + docker stop neurow_test + docker rm neurow_test