-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.77 KB
/
Copy pathdeploy.yml
File metadata and controls
54 lines (45 loc) · 1.77 KB
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
52
53
54
name: deploy
on:
push:
branched:
- develop # action 트리거 브랜치
workflow_dispatch: # 수동 실행 옵션 (생략)
jobs:
build:
runs-on: ubuntu-latest # action 스크립트가 작동될 OS
steps: # 작업 단계
- name: Checkout source code # 단계별 이름, 구분자로 소스를 가져옴
uses: actions/checkout@v2
- name: Set up JDK 11 # JDK 설치
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Build with Gradle
run: ./gradlew clean build
shell: bash
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYYMMDDTHHmm
utcOffset: "+09:00"
- name: Generate deployment package
run: |
mkdir -p deploy
cp ./build/libs/three-days-0.0.1-SNAPSHOT.jar deploy/todo-application-prod-ebextensions-1.jar
cd deploy && zip -r todo-application-prod-label-${{steps.current-time.outputs.formattedTime}}-${{github.sha}} .
- name: Deploy Consumer to EB
uses: einaregilsson/beanstalk-deploy@v14
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: threedays
environment_name: Threedays-env-1
version_label: todo-application-prod-label-${{steps.current-time.outputs.formattedTime}}-${{github.sha}}
region: ap-northeast-2
deployment_package: deploy/todo-application-prod-label-${{steps.current-time.outputs.formattedTime}}-${{github.sha}}.zip
wait_for_deployment: false