Skip to content

Commit

Permalink
feat: Github Action gradle.yml 파일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepelown authored Dec 2, 2024
1 parent f596796 commit 35e21c7
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
# 기본 체크아웃
- name: Checkout
uses: actions/checkout@v3

# Gradlew 실행 허용
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew

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

# 환경 변수 설정
- name: Set environment values
run: |
cd ./src/main/resources
touch ./env.properties
echo "SPRING_DATASOURCE_URL=${{ secrets.SPRING_DATASOURCE_URL }}" >> ./env.properties
echo "SPRING_DATASOURCE_USERNAME=${{ secrets.SPRING_DATASOURCE_USERNAME }}" >> ./env.properties
echo "SPRING_DATASOURCE_PASSWORD=${{ secrets.SPRING_DATASOURCE_PASSWORD }}" >> ./env.properties
echo "JWT_KEY=${{ secrets.JWT_KEY }}" >> ./env.properties
echo "JWT.EXPIRATION.HOURS=${{ secrets.JWT_EXPIRATION_HOURS }}" >> ./env.properties
echo "JWT.ISSUER=${{ secrets.JWT_ISSUER }}" >> ./env.properties
shell: bash

# Gradle build (Test 제외)
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: clean build -x test

0 comments on commit 35e21c7

Please sign in to comment.