diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..fff43a6 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,25 @@ +name: Build Docker Image + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@v1 + + - name: Build Docker image + run: docker build -t note-keeping-app:latest . + + - name: Tag Docker image + run: docker tag note-keeping-app:latest 188401947203.dkr.ecr.us-east-1.amazonaws.com/note_keeping_app:latest + + - name: Push Docker image to Amazon ECR + run: docker push 188401947203.dkr.ecr.us-east-1.amazonaws.com/note-keeping-app:latest