-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for github cicd auto build and push docker image
- Loading branch information
1 parent
6ba021b
commit c66068c
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |