Skip to content

Commit

Permalink
#325 Fix: CI/CD 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
yumzen committed Feb 9, 2025
1 parent c22378b commit d787604
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Codiary CI

on:
pull_request:
branches:
- develop

permissions: write-all

jobs:
build:
# ubuntu 버전 지정
runs-on: ubuntu-22.04
steps:
# 소스 코드 체크아웃
- uses: actions/checkout@v4

# Build를 위한 JDK 설치
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'

# Gradle 캐싱
- name: Cache
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Gradle 권한 부여
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# application.yml 생성
- name: Make application-secret.yml
run: |
cd ./src/main
[ ! -d "resources" ] && mkdir resources
cd ./resources
touch ./application.yml
echo "${{ secrets.APPLICATION_SECRET_YML}}" > ./application.yml
shell: bash

# Gradle clean bootJar
- name: Build Gradle
run: ./gradlew clean bootJar
4 changes: 2 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Codiary CI/CD
name: Codiary CD

on:
pull_request:
push:
branches:
- develop

Expand Down

0 comments on commit d787604

Please sign in to comment.