ci: Gitea 환경으로 전환 (git.tolelom.xyz 레지스트리, tolchain GitHub 체크아웃)

- Docker registry: ghcr.io → git.tolelom.xyz
- 로그인: GITEA_TOKEN 사용
- tolchain 체크아웃: vars.TOLCHAIN_GITHUB_REPO 로 GitHub에서 가져오기

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 17:25:16 +09:00
parent 38da7ce57a
commit e187a20e28

View File

@@ -13,10 +13,11 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Checkout tolchain dependency # tolchain은 GitHub에 위치 — vars.TOLCHAIN_GITHUB_REPO 에 "owner/tolchain" 형태로 설정
- name: Checkout tolchain from GitHub
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: ${{ github.repository_owner }}/tolchain repository: ${{ vars.TOLCHAIN_GITHUB_REPO }}
path: ../tolchain path: ../tolchain
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
@@ -42,47 +43,43 @@ jobs:
name: coverage name: coverage
path: coverage.out path: coverage.out
# ── 2. Docker 빌드 & GHCR 푸시 (main 머지 시만) ─────────────────────────── # ── 2. Docker 빌드 & Gitea 레지스트리 푸시 (main 머지 시만) ───────────────
docker: docker:
needs: test needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps: steps:
# Dockerfile이 context 루트에 tolchain/ + a301_server/ 를 기대하므로
# 각각 하위 디렉토리로 체크아웃
- name: Checkout a301_server - name: Checkout a301_server
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
path: a301_server path: a301_server
- name: Checkout tolchain dependency # tolchain 없이는 Dockerfile이 빌드되지 않으므로 같은 레벨에 체크아웃
- name: Checkout tolchain from GitHub
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: ${{ github.repository_owner }}/tolchain repository: ${{ vars.TOLCHAIN_GITHUB_REPO }}
path: tolchain path: tolchain
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3 - uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: git.tolelom.xyz
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITEA_TOKEN }}
- uses: docker/build-push-action@v5 - uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./a301_server/Dockerfile file: ./a301_server/Dockerfile
push: true push: true
tags: ghcr.io/${{ github.repository_owner }}/a301-server:latest tags: git.tolelom.xyz/${{ github.repository_owner }}/a301-server:latest
platforms: linux/arm64 platforms: linux/arm64
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
# ── 3. 서버 배포 (Docker 푸시 완료 후) ──────────────────────────────────── # ── 3. 서버 배포 ──────────────────────────────────────────────────────────
deploy: deploy:
needs: docker needs: docker
runs-on: ubuntu-latest runs-on: ubuntu-latest