feat(ci): added new test docker

This commit is contained in:
Stan Girard 2023-07-18 16:25:16 +02:00
parent d16b419035
commit 8545b9ca3b

39
.github/workflows/docker-build-test.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Deploy Backend to Preview ECS
on:
push:
branches: [ "main" ]
paths:
- 'backend/core/**'
env:
ECR_REPOSITORY: quivr # set this to your Amazon ECR repository name
ECS_SERVICE: quivr-preview # set this to your Amazon ECS service name
ECS_CLUSTER: quivr # set this to your Amazon ECS cluster name # file, e.g. .aws/task-definition.json
CONTAINER_NAME: quivr # set this to the name of the container in the
# containerDefinitions section of your task definition
permissions:
contents: read
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend/
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
id: build-image
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .