Skip to content

fix: build-and-deploy가 보이지 않는 문제 수정 #10

fix: build-and-deploy가 보이지 않는 문제 수정

fix: build-and-deploy가 보이지 않는 문제 수정 #10

name: ItcastBuildAndTest
on:
push:
branches:
- main
- issue/**
pull_request:
branches:
- main
- issue/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Set up Docker Compose
run: |
docker-compose up -d
docker-compose ps
- name: Wait for services to be ready
run: |
until docker-compose exec -T mysql mysqladmin ping -h"127.0.0.1" --silent; do
echo "Waiting for MySQL to be ready"
sleep 5
done
sleep 10
- name: Build with Gradle
run: |
chmod +x ./gradlew
./gradlew clean build -x test -Duser.language=ko -Duser.country=KR
- name: Tear down Docker Compose
if: always()
run: docker-compose down