-
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.
Merge pull request #6 from mash-up-kr/feature/github-flows
feat: Write github workflows for CI & CD
- Loading branch information
Showing
6 changed files
with
150 additions
and
13 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,47 @@ | ||
name: CD | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 21 | ||
distribution: temurin | ||
|
||
- name: Get CurrentTime | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- run: chmod +x gradlew && ./gradlew build | ||
|
||
- name: 도커 이미지 빌드 & 푸시 by jib | ||
run: | | ||
./gradlew :pic-api:jib -Prelease | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Beanstalk Deploy | ||
uses: einaregilsson/beanstalk-deploy@v22 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_BEANSTALK_ACCESS_KEY }} | ||
aws_secret_key: ${{ secrets.AWS_BEANSTALK_SECRET_KEY }} | ||
application_name: pic-backend-eb-app | ||
environment_name: pic-backend-eb-env | ||
version_label: pic-deploy-${{steps.current-time.outputs.formattedTime}} | ||
region: ap-northeast-2 | ||
deployment_package: ./deploy/Dockerrun.aws.json |
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,31 @@ | ||
name: Pull request workflow (build check) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 21 | ||
distribution: temurin | ||
|
||
- name: Get CurrentTime | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- name: build test | ||
run: chmod +x gradlew && ./gradlew build |
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
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,12 @@ | ||
{ | ||
"AWSEBDockerrunVersion": "1", | ||
"Image": { | ||
"Name": "gappangzip/pic-api:latest", | ||
"Update": "true" | ||
}, | ||
"Ports": [ | ||
{ | ||
"ContainerPort": "8080" | ||
} | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
rootProject.name = "gappangzip-backend" | ||
include("pic-api") | ||
include("pic-common") | ||
include("pic-external") | ||
include("pic-domain") | ||
include( | ||
"pic-api", | ||
"pic-domain", | ||
"pic-common", | ||
"pic-external" | ||
) |