Repository navigation
feat(base): install gh-stack and gh-actions-lock GitHub CLI extensions - #8
Conversation
Add install-gh-extensions.sh (coder user) that installs github/gh-stack and github/gh-actions-lock. Both install without authentication, but unauthenticated API calls are limited to 60/hour per IP, which shared GitHub-hosted runners can exhaust, so the publish workflow passes GITHUB_TOKEN as an optional BuildKit secret (gh_token). The secret is mounted only for that RUN step and never lands in an image layer.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds GitHub CLI extensions (gh stack and gh actions-lock) to the Coder workspace base image, including updates to the Dockerfile, a new installation script, and documentation. The review feedback identifies a medium-severity issue in the installation script where set -e causes an immediate exit on failure, bypassing the custom error message, and suggests adding explicit error handlers for each installation command.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds GitHub CLI extensions (gh-stack and gh-actions-lock) to the Coder base Docker image, including a new installation script and corresponding documentation updates. The review feedback correctly identifies a high-severity issue in the Dockerfile where the BuildKit secret mount for gh_token lacks the optional=true attribute, which would cause build failures during local builds or fork PRs where the secret is not provided.
개요
베이스 이미지에 GitHub CLI 확장 두 개를 설치합니다.
github/gh-stack: GitHub 네이티브 stacked PR (gh stack)github/gh-actions-lock: GitHub Actions 의존성 lock·검증 (gh actions-lock)변경 사항
scripts/install-gh-extensions.sh(새 파일, coder 사용자):gh extension install로 두 확장을 설치하고, 각 확장을 실행해 설치를 확인합니다.gh extension list는 인증이 필요해서 확인용으로 쓰지 않았습니다.Dockerfile: Graphite 설치 다음에 위 스크립트를 실행하는 단계를 추가했습니다.RUN --mount=type=secret,id=gh_token,mode=0444로 토큰을 이 명령에서만 읽을 수 있게 합니다..github/workflows/docker-publish.yml:build-push-action에secrets: gh_token=${{ secrets.GITHUB_TOKEN }}를 추가했습니다.CLAUDE.md,README.md,images/CLAUDE.md에 새 스크립트와 실행 순서를 추가했습니다.왜 secret을 넘기나
두 확장은 공개 저장소라 인증 없이도 설치됩니다. 하지만 인증 없는 GitHub API는 IP당 시간당 60회로 제한되고, GitHub-hosted 러너는 IP를 여럿이 함께 씁니다. 그래서 매일 도는 빌드가 rate limit 때문에 가끔 실패할 수 있어, 있으면 쓰는 선택 사항으로 토큰을 넘깁니다. secret이 없으면(로컬 빌드, fork PR) 인증 없이 설치합니다.
검증
ubuntu:24.04+ gh(apt) +coder사용자로 이 단계만 재현해 확인했습니다.gh stack version 0.2.1--secret id=gh_token으로 빌드: 설치 성공/run/secrets없음,GH_TOKEN환경 변수 없음,docker history에 토큰 흔적 없음참고
~/.local/share/gh/extensions/에 설치됩니다. Coder 템플릿이/home/coder를 영구 볼륨으로 붙이면 기존 워크스페이스에는 반영되지 않습니다.coder.amond에는 두 확장이 이미 설치돼 있습니다(gh-stack v0.2.1, gh-actions-lock v0.2.0).images/dev/.devcontainer이미지는 이번 범위에서 제외했습니다.작성자: 이민수 (Minsu Lee, @amondnet) · minsu.lee@passionfactory.ai