-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.83 KB
/
deploy-dev.yml
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
55
56
57
58
59
60
61
name: waggle dev CI/CD
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.DEV_AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build with Gradle & Upload Image to ECR
run: ./gradlew -Pdev clean jib
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYYMMDD_HH-mm-ss
utcOffset: "+09:00"
- name: Generate deployment package
run: |
mkdir -p deploy/.platform/nginx/conf.d
cp docker-compose.yml deploy/docker-compose.yml
cp -r .ebextensions-dev deploy/.ebextensions
cp .platform/nginx/conf.d/proxy-dev.conf deploy/.platform/nginx/conf.d/proxy.conf
cd deploy && zip -r deploy.zip .
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
application_name: waggle-dev
environment_name: Waggle-dev-env
version_label: waggle-dev-${{steps.current-time.outputs.formattedTime}}
region: ${{ secrets.DEV_AWS_REGION }}
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 500