-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (93 loc) Β· 3.65 KB
/
deploy-test.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: xquare-deployment
on:
push:
branches: [ "deploy-test" ]
jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: mysql
uses: mirromutth/[email protected]
with:
host port: 3306
container port: 3306
mysql database: 'maeumgagym'
mysql root password: ${{ secrets.TEST_DB_PASSWORD }}
- name: gradle caching
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts*', '**/gradle-wrapper.properties') }}
- name: Build gradle
run: ./gradlew build
env:
SPRING_PROFILES_ACTIVE: local
DB_URL: ${{ secrets.TEST_DB_URL }}
DB_USERNAME: ${{ secrets.TEST_DB_USERNAME }}
DB_PASSWORD: ${{ secrets.TEST_DB_PASSWORD }}
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
JWT_ACCESS_EXP: ${{ secrets.JWT_ACCESS_EXP }}
JWT_REFRESH_EXP: ${{ secrets.JWT_REFRESH_EXP }}
JWT_HEADER: ${{ secrets.JWT_HEADER }}
JWT_PREFIX: ${{ secrets.JWT_PREFIX }}
GRANT_TYPE: ${{ secrets.GRANT_TYPE }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
REDIS_HOST: ${{ secrets.TEST_REDIS_HOST }}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
FILE_SERVER_SECRET_KEY: ${{ secrets.FILE_SERVER_SECRET_KEY }}
FILE_SERVER_URL: ${{ secrets.FILE_SERVER_URL }}
VIDEO_ID_SAVE_TTL: ${{ secrets.VIDEO_ID_SAVE_TTL }}
SUFFIX_PATH: ${{ secrets.SUFFIX_PATH }}
SWAGGER_PATH: ${{ secrets.SWAGGER_PATH }}
SWAGGER_UI_PATH: ${{ secrets.SWAGGER_UI_PATH }}
- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: stag
access_key: ${{ secrets.ACCESS_KEY }}
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
build_path: maeumgagym-infrastructure
buildargs: |
SPRING_PROFILES_ACTIVE=stag
DB_URL=${{ secrets.DB_URL }}
DB_PASSWORD=${{ secrets.DB_PASSWORD }}
DB_USERNAME=${{ secrets.DB_USERNAME }}
JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }}
JWT_ACCESS_EXP=${{ secrets.JWT_ACCESS_EXP }}
JWT_REFRESH_EXP=${{ secrets.JWT_REFRESH_EXP }}
JWT_HEADER=${{ secrets.JWT_HEADER }}
JWT_PREFIX=${{ secrets.JWT_PREFIX }}
GRANT_TYPE=${{ secrets.GRANT_TYPE }}
CLIENT_ID=${{ secrets.CLIENT_ID }}
REDIRECT_URI=${{ secrets.REDIRECT_URI }}
REDIS_HOST=${{ secrets.REDIS_HOST }}
REDIS_PORT=${{ secrets.REDIS_PORT }}
FILE_SERVER_SECRET_KEY=${{ secrets.FILE_SERVER_SECRET_KEY }}
FILE_SERVER_URL=${{ secrets.FILE_SERVER_URL }}
VIDEO_ID_SAVE_TTL=${{ secrets.VIDEO_ID_SAVE_TTL }}
SUFFIX_PATH=${{ secrets.SUFFIX_PATH }}
SWAGGER_PATH=${{ secrets.SWAGGER_PATH }}
SWAGGER_UI_PATH=${{ secrets.SWAGGER_UI_PATH }}
FRONT_LOCAL=${{ secrets.FRONT_LOCAL }}
BACK_DOMAIN=${{ secrets.BACK_DOMAIN_STAG }}
CSRF_HEADER=${{ secrets.CSRF_HEADER }}
CSRF_COOKIE=${{ secrets.CSRF_COOKIE }}
CSRF_PARAMETER=${{ secrets.CSRF_PARAMETER }