-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.35 KB
/
cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CD
on:
push:
branches:
- main
- develop
pull_request:
branches:
- 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@v21
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
wait_for_deployment: false