Skip to content

chore : 2주 간격 수집 워크플로 추가 (main→dev, release→운영 DB) - #18

Open
yuyeol3 wants to merge 2 commits into
mainfrom
yuyeol3/chore/collect
Open

yuyeol3 wants to merge 2 commits into
mainfrom
yuyeol3/chore/collect

Conversation

@yuyeol3

@yuyeol3 yuyeol3 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

변경점 👍

수집 배치를 GitHub Actions에서 주기적으로 돌려 서버 DB에 씁니다. 서버(e2-micro, 1GB)에는 Chromium 8개를 띄울 여유가 없어서 러너에서 실행합니다.

  • collect.yml
    • 주기: LLM API가 유료라 약 2주 간격으로 돕니다(매월 2·16일 04:00 KST). 그 사이에는 Actions 탭에서 수동 실행(workflow_dispatch)할 수 있습니다.
    • main → dev DB, release → 운영 DB입니다. 운영은 레포 변수 PROD_ENABLED=true일 때만 돕니다(운영 서버 준비 전에는 건너뜀).
  • _collect.yml (재사용 워크플로)
    1. 같은 브랜치로 ci.yml(테스트)을 먼저 돌립니다. 실패하면 수집하지 않습니다.
    2. Chromium을 설치합니다(은행 상품 URL 스크래핑용).
    3. GCP에 OIDC로 인증하고, IAP SSH 포트 포워딩으로 서버 Postgres(127.0.0.1:5678)를 러너 15432에 연결합니다. DB 포트를 외부에 열지 않습니다.
    4. ./gradlew bootRun으로 배치를 실행합니다. 배치가 FAILED면 #17에서 고친 종료 코드 때문에 단계가 실패합니다.
  • CLAUDE.md: 수집 워크플로 설정, 필요한 Environment 값, 그리고 "엔티티가 새 컬럼을 쓰면 Fin-BE 배포가 먼저"라는 순서 제약을 적었습니다.

테스트 💻

  • actionlint(shellcheck 포함) 통과
  • 터널용 SSH 키는 1시간 뒤 만료됩니다(이미 연결된 터널은 유지).
  • 종료 코드 전달은 #17에서 확인했습니다(FAILED → 종료 코드 5).
  • 실제 수집(GCP 터널, Chromium 설치)은 스케줄·수동 실행 워크플로라 머지 후 첫 수동 실행에서 확인됩니다.

머지 전 체크리스트

Base automatically changed from yuyeol3/chore/ci to main October 29, 2026 00:00
Actions 러너에서 CI 통과 후 GCP OIDC + IAP 터널로 서버 DB에 붙어 수집 배치를 돌린다
@yuyeol3
yuyeol3 force-pushed the yuyeol3/chore/collect branch from 7a6e9c3 to 8fb3822 Compare October 29, 2026 07:53
@yuyeol3
yuyeol3 marked this pull request as ready for review October 29, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant