-
Notifications
You must be signed in to change notification settings - Fork 8
fix: GitHub app token permission 권한 오류 해결 #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: GitHub app token permission 권한 오류 해결 #570
Conversation
…-token-permission # Conflicts: # .github/workflows/dev-cd.yml # .github/workflows/prod-cd.yml
…-token-permission # Conflicts: # .github/workflows/dev-cd.yml # .github/workflows/prod-cd.yml
…-token-permission
…-token-permission
…-token-permission
Walkthrough
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-11-10T01:55:03.827ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/dev-cd.yml(1 hunks).github/workflows/prod-cd.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Hexeong
Repo: solid-connection/solid-connect-server PR: 552
File: .github/workflows/prod-cd.yml:40-45
Timestamp: 2025-11-10T01:55:03.827Z
Learning: GHCR (GitHub Container Registry)에서는 docker login 시 사용자명의 대소문자를 구분하지 않으며, 레지스트리 경로명은 항상 소문자로 정규화됩니다. 따라서 `github.repository_owner`를 그대로 사용해도 이미지 경로와의 대소문자 불일치 문제가 발생하지 않습니다.
📚 Learning: 2025-11-10T01:55:03.827Z
Learnt from: Hexeong
Repo: solid-connection/solid-connect-server PR: 552
File: .github/workflows/prod-cd.yml:40-45
Timestamp: 2025-11-10T01:55:03.827Z
Learning: GHCR (GitHub Container Registry)에서는 docker login 시 사용자명의 대소문자를 구분하지 않으며, 레지스트리 경로명은 항상 소문자로 정규화됩니다. 따라서 `github.repository_owner`를 그대로 사용해도 이미지 경로와의 대소문자 불일치 문제가 발생하지 않습니다.
Applied to files:
.github/workflows/dev-cd.yml.github/workflows/prod-cd.yml
🔇 Additional comments (3)
.github/workflows/prod-cd.yml (2)
109-109: Docker login 사용자명을x-access-token으로 변경(prod 환경).변경 사항:
- dev-cd.yml과 동일한 패턴으로
x-access-token사용자명 적용- 원격 서버에서의 image pull 시 GitHub App 토큰 기반 인증
환경 간 일관성: dev와 prod 환경 모두에 동일한 인증 메커니즘 적용되어 일관성이 있습니다. ✓
변경된 docker login 명령이 프로덕션 배포 파이프라인에서 실제로 정상 동작하는지 확인 및 테스트해주세요.
128-134: 프로덕션 배포 안정성 로직 확인.Docker Compose 재시작 단계에서 graceful shutdown 패턴을 적용하고 있습니다:
docker compose stop- 컨테이너를 정상 종료docker compose down --remove-orphans- 네트워크 제거 및 고아 컨테이너 정리docker compose up -d- 새 컨테이너 시작이는 dev 환경의 단순한
down → up패턴(라인 125-126 dev-cd.yml)과 다릅니다. 프로덕션에서는 더 견고한 배포 로직이 적용되고 있어 좋습니다. ✓.github/workflows/dev-cd.yml (1)
70-77: GitHub App 권한 설정이 GHCR 인증에 적절함을 확인했습니다.웹 검색 결과에 따르면 다음과 같습니다.
비공개 GHCR 이미지 인증 요구사항
- GitHub App 설치 토큰에
permission-packages: "read"권한이 포함되면 GHCR에서 비공개 이미지 pull에 필요한 최소 권한을 충족합니다.공개 vs 비공개 이미지의 권한 요구 차이
- 공개 GHCR 이미지는 인증 없이 pull 가능합니다.
- 비공개 이미지는 설치 토큰과 packages 권한(read 이상)을 필요로 합니다.
현재 설정의 적절성
- 라인 70-77의
permission-packages: "read"설정은 라인 93-142에서 수행하는 이미지 pull 작업에 충분한 권한입니다.따라서 GitHub App 토큰 생성 단계의 권한 설정은 올바르며, issue #564에서 의도한 권한 명시가 정확하게 반영되어 있습니다.
관련 이슈
작업 내용
특이 사항
리뷰 요구사항 (선택)