Skip to content

Commit

Permalink
fix: refac gradle scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
DongGeon0908 authored Jul 2, 2024
1 parent 645d256 commit 9248200
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: hero-alignlab-api Gradle CI/CD
name: hero-alignlab-api CI/CD

# release 브랜치에 push 또는 pull request가 되면 스크립트 실행
on:
Expand All @@ -14,7 +14,7 @@ on:
pull_request:
branches: [ main ]

# 해당 코드에서 사용될 변수 설정
# 해당 스크립트에서 사용될 환경 변수
env:
AWS_REGION: ap-northeast-2
PROJECT_NAME: hero-alignlab-api
Expand All @@ -35,21 +35,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 17
# JDK 17, Corretto 17
- name: Set up Corretto JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

# Secret Setup
- name: Set Prod Yml
- name: Inject env-values to prod.yml
uses: microsoft/variable-substitution@v1
with:
files: ./src/main/resources/config/application-prod.yml
env:
# Database 환경 변수 주입
hero.master.datasource.url: ${{ secrets.HERO_MASTER_DATASOURCE_URL }}
hero.master.datasource.username: ${{ secrets.HERO_MASTER_DATASOURCE_USERNAME }}
hero.master.datasource.password: ${{ secrets.HERO_MASTER_DATASOURCE_PASSWORD }}
# Aws Credentials 환경 변수 주입
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY_ID }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Expand Down

0 comments on commit 9248200

Please sign in to comment.