forked from woowacourse-teams/2022-moamoa
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 2.24 KB
/
deploy-backend-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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: Deploy Backend Dev
on:
push:
branches : develop
paths:
- 'backend/**'
workflow_dispatch:
defaults:
run:
working-directory: backend
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: '11'
distribution: 'temurin'
- name: Build
run: ./gradlew build --exclude-task test --exclude-task asciidoctor
- name: Test
env:
client-id: ${{ secrets.CLIENT_ID }}
client-secret: ${{ secrets.CLIENT_SECRET }}
jwt-secret-key: ${{ secrets.JWT_SECRET_KEY }}
jwt-expire-length: ${{ secrets.JWT_EXPIRE_LENGTH }}
SLACK_USERS : ${{secrets.SLACK_USERS}}
SLACK_SAND_MESSAGE : ${{secrets.SLACK_SAND_MESSAGE}}
SLACK_AUTHORIZATION : ${{secrets.SLACK_AUTHORIZATION}}
run: ./gradlew test -Dmoamoa.allow-origins='*' -Doauth2.github.client-id=${{ env.client-id }} -Doauth2.github.client-secret=${{ env.client-secret }} -Dsecurity.jwt.token.secret-key=${{ env.jwt-secret-key }} -Dsecurity.jwt.token.expire-length=${{ env.jwt-expire-length }} -Dslack.authorization=${{ env.SLACK_AUTHORIZATION }} -Dslack.users=${{ env.SLACK_USERS }} -Dslack.send.message=${{ env.SLACK_SAND_MESSAGE }}
- name: SonarQube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: ./gradlew sonarqube --info
- name : Deploy
run: |
curl ${{ secrets.DEPLOY_DEV_BACKEND_REQUEST_URL }}