Skip to content

Conversation

@Hexeong
Copy link
Contributor

@Hexeong Hexeong commented Nov 20, 2025

관련 이슈

작업 내용

  • GHCR에 올라간 이미지는 Github Action에서 제공하는 권한으로는 삭제할 수 없다고 공식문서에 나와있습니다.
  • Github에서 해당 방식을 권장하는 이유는 자동화된 봇이 package 삭제권한을 주기에는 너무 큰 권한을 가지기에, 사용자가 승인한 토큰으로 개발하는게 정석이라고 합니다...
  • 때문에 GHCR 이미지 정리(삭제)는 PAT로 구현해두었습니다!

특이 사항

리뷰 요구사항 (선택)

@Hexeong Hexeong self-assigned this Nov 20, 2025
@Hexeong Hexeong added the 버그 Something isn't working label Nov 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

이 PR은 두 개의 GitHub Actions 워크플로우 파일에서 GHCR(GitHub Container Registry) 정리 단계에 사용되는 토큰을 변경합니다.

  1. dev-cd.yml: GITHUB_TOKEN에서 PACKAGE_DELETE_TOKEN으로 토큰 업데이트
  2. prod-cd.yml: secrets.GITHUB_TOKEN에서 secrets.PACKAGE_DELETE_TOKEN으로 토큰 업데이트

두 경우 모두 토큰 참조만 변경되었으며, 정리 로직 자체는 동일하게 유지됩니다.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3분

  • 동일한 패턴의 반복적인 변경으로 두 파일 모두 일관성 있게 업데이트됨
  • 토큰 참조 변경 외 다른 동작 로직 변화 없음
  • 간단한 문자열 치환 성격의 변경

Suggested reviewers

  • wibaek
  • whqtker
  • lsy1307
  • JAEHEE25
  • sukangpunch
  • Gyuhyeok99

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 GHCR 정리 권한 문제를 PAT로 해결하는 것이 주요 변경사항이라는 점을 명확하게 전달하며, 코드베이스 변경사항과 일치합니다.
Description check ✅ Passed PR 설명은 템플릿의 주요 섹션(관련 이슈, 작업 내용)을 포함하고 있으며, GHCR 정리 문제의 배경과 해결책을 명확히 설명하고 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경사항(dev-cd.yml, prod-cd.yml에서 GITHUB_TOKEN을 PACKAGE_DELETE_TOKEN으로 변경)은 #572 이슈의 GHCR 정리 권한 문제를 해결하기 위한 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항은 두 개의 GitHub Actions 워크플로우 파일에서 GHCR 정리 단계의 토큰만 변경하는 것으로, #572 이슈 범위 내에 완전히 포함되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3fb02d and 121220d.

📒 Files selected for processing (2)
  • .github/workflows/dev-cd.yml (1 hunks)
  • .github/workflows/prod-cd.yml (1 hunks)
⏰ 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)
  • GitHub Check: build
🔇 Additional comments (2)
.github/workflows/prod-cd.yml (1)

89-98: 1️⃣ PACKAGE_DELETE_TOKEN 설정 확인 필수

GitHub 공식 문서의 권장사항에 따라 GHCR 이미지 삭제 작업을 PAT(Personal Access Token)로 수행하도록 변경된 점이 좋습니다. 다만 이 변경이 작동하려면:

  • secrets.PACKAGE_DELETE_TOKEN이 리포지토리 secrets에 등록되어 있어야 함
  • 토큰에는 다음 권한이 포함되어야 함: write:packages, delete:packages, read:packages
  • 토큰의 만료 기한을 주기적으로 확인하고 갱신해야 함

설정 완료 후 워크플로우를 한 번 실행하여 권한이 정상 작동하는지 검증하시기 바랍니다.

.github/workflows/dev-cd.yml (1)

73-82: 2️⃣ 일관성 있는 토큰 전환 - dev/prod 환경 모두 반영

dev 워크플로우도 동일하게 PAT로 전환되어 환경 간 일관성이 유지되는 점이 좋습니다. 다만 prod-cd.yml의 검토 항목 1️⃣에서 언급한 secrets.PACKAGE_DELETE_TOKEN 설정이 완료되면, 이 워크플로우도 정상 작동합니다.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@Gyuhyeok99 Gyuhyeok99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많으십니다~ 나중에 다같이 있을 때 문제 및 해결과정 공유해주시면 좋겠습니다!

@Hexeong Hexeong merged commit 4da854b into solid-connection:develop Nov 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

버그 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 기존 GHCR 정리 관련 권한 문제 해결

2 participants