Skip to content

try building the image without pushing #37

try building the image without pushing

try building the image without pushing #37

Workflow file for this run

name: Docker push
permissions:
contents: read
id-token: write
on:
push:
branches:
- main
- add-curl-check-before-pushing-image # to be cleaned up before merging
jobs:
docker_push:
runs-on: ubuntu-latest
steps:
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v 4.0.1
with:
role-to-assume: ${{ secrets.iam_role }}
role-session-name: docker_build_public
aws-region: us-east-1
- uses: actions/checkout@v4
- 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 }} --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