[FEAT] Docker CI/CD #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: Create application.yml | |
run: | | |
## server 디렉토리로 이동하여 application.yml 파일 생성 | |
mkdir -p ./server/src/main/resources | |
cd ./server/src/main/resources | |
# application.yml 파일 생성 | |
touch application.yml | |
# GitHub Secrets에서 설정한 값을 application.yml 파일에 쓰기 | |
echo "${{ secrets.CI_APPLICATION }}" > application.yml | |
# application.yml 파일 확인 | |
cat application.yml | |
shell: bash | |
- name: build | |
run: | | |
cd server # 서버 디렉토리로 이동 | |
chmod +x gradlew | |
./gradlew build -x test # 테스트 제외하고 빌드 | |
shell: bash |