@k2works/claude-code-booster 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Build and Push Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
tag:
|
|
10
|
+
description: 'Image tag (e.g., 0.0.1)'
|
|
11
|
+
required: true
|
|
12
|
+
default: 'latest'
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
REGISTRY: ghcr.io
|
|
16
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build-and-push:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
packages: write
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout repository
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Set up Docker Buildx
|
|
31
|
+
uses: docker/setup-buildx-action@v3
|
|
32
|
+
|
|
33
|
+
- name: Log in to GitHub Container Registry
|
|
34
|
+
uses: docker/login-action@v3
|
|
35
|
+
with:
|
|
36
|
+
registry: ${{ env.REGISTRY }}
|
|
37
|
+
username: ${{ github.actor }}
|
|
38
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
39
|
+
|
|
40
|
+
- name: Extract metadata (tags, labels)
|
|
41
|
+
id: meta
|
|
42
|
+
uses: docker/metadata-action@v5
|
|
43
|
+
with:
|
|
44
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
45
|
+
tags: |
|
|
46
|
+
type=ref,event=tag
|
|
47
|
+
type=raw,value=latest,enable=${{ github.ref_type == 'tag' }}
|
|
48
|
+
type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }}
|
|
49
|
+
|
|
50
|
+
- name: Build and push Docker image
|
|
51
|
+
uses: docker/build-push-action@v5
|
|
52
|
+
with:
|
|
53
|
+
context: .
|
|
54
|
+
file: ./Dockerfile
|
|
55
|
+
push: true
|
|
56
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
57
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
58
|
+
cache-from: type=gha
|
|
59
|
+
cache-to: type=gha,mode=max
|
|
60
|
+
platforms: linux/amd64
|
|
61
|
+
|
|
62
|
+
- name: Generate image summary
|
|
63
|
+
run: |
|
|
64
|
+
echo "## Docker Image Published" >> $GITHUB_STEP_SUMMARY
|
|
65
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
66
|
+
echo "**Registry:** ${{ env.REGISTRY }}" >> $GITHUB_STEP_SUMMARY
|
|
67
|
+
echo "**Image:** ${{ env.IMAGE_NAME }}" >> $GITHUB_STEP_SUMMARY
|
|
68
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
69
|
+
echo "### Tags" >> $GITHUB_STEP_SUMMARY
|
|
70
|
+
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
71
|
+
echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
|
|
72
|
+
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
73
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
74
|
+
echo "### Pull Command" >> $GITHUB_STEP_SUMMARY
|
|
75
|
+
echo '```bash' >> $GITHUB_STEP_SUMMARY
|
|
76
|
+
echo "docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_STEP_SUMMARY
|
|
77
|
+
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
@@ -5,16 +5,23 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
7
|
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
8
13
|
jobs:
|
|
9
14
|
deploy:
|
|
10
15
|
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
11
18
|
|
|
12
19
|
steps:
|
|
13
20
|
- name: Checkout the repository
|
|
14
|
-
uses: actions/checkout@
|
|
21
|
+
uses: actions/checkout@v4
|
|
15
22
|
|
|
16
23
|
- name: Use Node.js latest
|
|
17
|
-
uses: actions/setup-node@
|
|
24
|
+
uses: actions/setup-node@v4
|
|
18
25
|
with:
|
|
19
26
|
node-version: latest
|
|
20
27
|
cache: 'npm'
|
|
@@ -22,11 +29,11 @@ jobs:
|
|
|
22
29
|
- name: Install dependencies
|
|
23
30
|
run: npm install
|
|
24
31
|
|
|
25
|
-
- name:
|
|
32
|
+
- name: Build documentation
|
|
26
33
|
run: npm run docs:build
|
|
27
34
|
|
|
28
|
-
- name:
|
|
29
|
-
uses: peaceiris/actions-gh-pages@
|
|
35
|
+
- name: Deploy to GitHub Pages
|
|
36
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
30
37
|
with:
|
|
31
|
-
|
|
38
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
32
39
|
publish_dir: ./site
|
package/lib/assets/README.md
CHANGED
|
@@ -38,10 +38,75 @@ claude mcp add github npx -y @modelcontextprotocol/server-github -s project
|
|
|
38
38
|
|
|
39
39
|
### 配置
|
|
40
40
|
|
|
41
|
+
#### GitHub Pages セットアップ
|
|
42
|
+
|
|
43
|
+
1. **GitHub リポジトリの Settings を開く**
|
|
44
|
+
- リポジトリページで `Settings` タブをクリック
|
|
45
|
+
|
|
46
|
+
2. **Pages 設定を開く**
|
|
47
|
+
- 左サイドバーの `Pages` をクリック
|
|
48
|
+
|
|
49
|
+
3. **Source を設定**
|
|
50
|
+
- `Source` で `Deploy from a branch` を選択
|
|
51
|
+
- `Branch` で `gh-pages` を選択し、フォルダは `/ (root)` を選択
|
|
52
|
+
- `Save` をクリック
|
|
53
|
+
|
|
54
|
+
4. **初回デプロイ**
|
|
55
|
+
- main ブランチにプッシュすると GitHub Actions が自動実行
|
|
56
|
+
- Actions タブでデプロイ状況を確認
|
|
57
|
+
|
|
41
58
|
**[⬆ back to top](#構成)**
|
|
42
59
|
|
|
43
60
|
### 運用
|
|
44
61
|
|
|
62
|
+
#### GitHub Container Registry
|
|
63
|
+
|
|
64
|
+
このプロジェクトでは、GitHub Container Registry(GHCR)を使用して開発コンテナイメージを管理しています。
|
|
65
|
+
|
|
66
|
+
##### 自動ビルド・プッシュ
|
|
67
|
+
|
|
68
|
+
タグをプッシュすると、GitHub Actions が自動的にコンテナイメージをビルドし、GHCR にプッシュします。
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# タグを作成してプッシュ
|
|
72
|
+
git tag 0.0.1
|
|
73
|
+
git push origin 0.0.1
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
##### イメージの取得・実行
|
|
77
|
+
|
|
78
|
+
GHCR からイメージを取得して実行するには:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# イメージをプル
|
|
82
|
+
docker pull ghcr.io/k2works/grokkingfp-excersice:latest
|
|
83
|
+
|
|
84
|
+
# または特定バージョン
|
|
85
|
+
docker pull ghcr.io/k2works/grokkingfp-excersice:0.0.1
|
|
86
|
+
|
|
87
|
+
# コンテナを実行
|
|
88
|
+
docker run -it -v $(pwd):/srv ghcr.io/k2works/grokkingfp-excersice:latest
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
認証が必要な場合は、以下のコマンドでログインします:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# GitHub Personal Access Token でログイン
|
|
95
|
+
echo $GITHUB_TOKEN | docker login ghcr.io -u <username> --password-stdin
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
##### 権限設定
|
|
99
|
+
|
|
100
|
+
- リポジトリの Settings → Actions → General で `Read and write permissions` を設定
|
|
101
|
+
- `GITHUB_TOKEN` に `packages: write` 権限が付与されています
|
|
102
|
+
|
|
103
|
+
##### Dev Container の使用
|
|
104
|
+
|
|
105
|
+
VS Code で Dev Container を使用する場合:
|
|
106
|
+
|
|
107
|
+
1. VS Code で「Dev Containers: Reopen in Container」を実行
|
|
108
|
+
2. または「Dev Containers: Rebuild and Reopen in Container」で再ビルド
|
|
109
|
+
|
|
45
110
|
**[⬆ back to top](#構成)**
|
|
46
111
|
|
|
47
112
|
### 開発
|