Skip to content

Commit

Permalink
Create docker-build.yml
Browse files Browse the repository at this point in the history
for github cicd auto build and push docker image
  • Loading branch information
Tomas-Deane authored Jun 3, 2024
1 parent 6ba021b commit c66068c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -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 <aws-account-id> 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

0 comments on commit c66068c

Please sign in to comment.