Repository navigation
feat(base): install gh-stack and gh-actions-lock GitHub CLI extensions #8
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
||
| echo "🧩 Installing GitHub CLI extensions..." | ||
|
|
||
|
amondnet marked this conversation as resolved.
|
||
| # gh는 root 단계의 apt 설치에 의존한다 — 없으면 원인을 바로 알리고 중단한다 | ||
| if ! command -v gh &> /dev/null; then | ||
| echo "❌ GitHub CLI (gh) not found; the root-phase GitHub CLI install must run first" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # 공개 저장소의 확장은 인증 없이 설치되지만, 비인증 API는 IP당 시간당 60회로 제한된다. | ||
| # CI는 BuildKit secret(gh_token)으로 토큰을 넘겨 공유 러너 IP의 rate limit을 피한다. | ||
| if [ -s /run/secrets/gh_token ]; then | ||
| GH_TOKEN="$(cat /run/secrets/gh_token)" | ||
| export GH_TOKEN | ||
| fi | ||
|
|
||
| # gh-stack: GitHub 네이티브 stacked PR / gh-actions-lock: Actions 의존성 lock·검증 | ||
| gh extension install github/gh-stack || { echo "❌ Failed to install github/gh-stack" >&2; exit 1; } | ||
| gh extension install github/gh-actions-lock || { echo "❌ Failed to install github/gh-actions-lock" >&2; exit 1; } | ||
|
|
||
| # 설치 확인 (`gh extension list`는 인증이 필요하므로 각 확장을 직접 실행한다) | ||
| if gh stack --version &> /dev/null && gh actions-lock --help &> /dev/null; then | ||
| echo "✅ GitHub CLI extensions installation completed!" | ||
| gh stack --version | ||
| else | ||
| echo "❌ GitHub CLI extensions verification failed!" >&2 | ||
| exit 1 | ||
| fi | ||
|
amondnet marked this conversation as resolved.
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.