chore: ci 스크립트를 작성한다. #11
Workflow file for this run
This file contains hidden or 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 with Gradle | |
| on: | |
| pull_request: | |
| branches: [ "develop", "release", "master" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v4 | |
| - name: 🔍 Docker 데몬 상태 확인 🐳 | |
| run: | | |
| echo "🚀 도커 데몬 상태를 확인합니다 🚀" | |
| if docker info; then | |
| echo "✅ 도커 데몬이 정상적으로 동작 중입니다! ✅" | |
| echo "🐳 도커 버전 정보 🐳" | |
| docker version | |
| echo "📦 실행 중인 컨테이너 목록 📦" | |
| docker ps | |
| else | |
| echo "❌ 도커 데몬이 동작하지 않습니다! ❌" | |
| echo "🔄 도커 서비스 상태 확인 🔄" | |
| sudo systemctl status docker || true | |
| echo "📝 도커 로그 확인 📝" | |
| sudo journalctl -u docker --no-pager -n 50 || true | |
| fi | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Make Gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle Wrapper | |
| run: ./gradlew build | |
| - name: Publish test results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| files: "**/build/test-results/**/*.xml" |