8639ca3d04
CI / build (push) Failing after 16m32s
- ci.yaml: JDK17 + MariaDB/Redis 서비스 컨테이너 → gradlew clean build → jar 아티팩트 - deploy.yaml: 수동 실행(workflow_dispatch) 배포 템플릿(SSH/scp·Docker 예시) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
pull_request:
|
|
branches: [main, dev]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
mariadb:
|
|
image: mariadb:11
|
|
env:
|
|
MARIADB_ROOT_PASSWORD: ci_root_pw
|
|
MARIADB_DATABASE: sb_db
|
|
options: >-
|
|
--health-cmd="healthcheck.sh --connect --innodb_initialized"
|
|
--health-interval=10s
|
|
--health-timeout=5s
|
|
--health-retries=15
|
|
redis:
|
|
image: redis:7
|
|
options: >-
|
|
--health-cmd="redis-cli ping"
|
|
--health-interval=10s
|
|
--health-timeout=5s
|
|
--health-retries=10
|
|
|
|
env:
|
|
DB_URL: jdbc:mariadb://mariadb:3306/sb_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul
|
|
DB_USERNAME: root
|
|
DB_PASSWORD: ci_root_pw
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: '6379'
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: '17'
|
|
cache: gradle
|
|
|
|
- name: Build & Test
|
|
run: |
|
|
chmod +x ./gradlew
|
|
./gradlew --no-daemon clean build
|
|
|
|
- name: Upload jar
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: app-jar
|
|
path: build/libs/*.jar
|
|
retention-days: 7
|