Skip to content

Commit

Permalink
chore: #6 ci와 cicd 워크플로우 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
j2noo committed Mar 1, 2024
1 parent 6572787 commit 788f006
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# github repository Actions 페이지에 나타낼 이름
name: soullive A CI with Gradle

# event trigger
# main, develop 브랜치에 pr 생성시 실행되는 트리거
on:
# pr 생성시 CI까지만 진행
pull_request:
branches: [ "main", "develop" ]


# permissions: write-all


jobs:
build:
runs-on: ubuntu-20.04
steps:
## jdk setting
- uses: actions/checkout@v3
- name: 🐧Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

## gradle caching
- name: 🐧Gradle Caching
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 🐧application.yml 파일을 생성 합니다.
run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.PROPERTIES }}" > ./application.yml
shell: bash

- name: 🐧gradle build를 위한 권한을 부여합니다.
run: chmod +x gradlew

- name: 🐧gradle build 중입니다.
run: ./gradlew build
shell: bash # ci는 여기까지
5 changes: 3 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
name: soullive A CI/CD with Gradle

# event trigger
# main, develop 브랜치에 push, pr 생성시 실행되는 트리거
# main, develop 브랜치에 push 시실행되는 트리거
on:
# 푸시했을 때 ci/cd
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]



# permissions: write-all
Expand Down

0 comments on commit 788f006

Please sign in to comment.