-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Administrate supernode via MCP #29
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
Changes from all commits
64a8b6d
52f5b65
b34d5b6
d26fe3b
b5ac128
7607237
4bfc40c
94b1435
a9affbe
23ca5e5
da7019c
fc88182
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| name: Build MCP server | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| paths: | ||
| - ".github/image/Dockerfile" | ||
| - ".github/workflows/build_mcp_server.yml" | ||
| - "mcp-server/**" | ||
|
|
||
| jobs: | ||
| build: | ||
| continue-on-error: true | ||
|
|
||
| strategy: | ||
| matrix: | ||
| include: | ||
| - release_for: Linux-x86_64 | ||
| build_on: ubuntu-22.04 | ||
| target: x86_64-unknown-linux-gnu | ||
| args: "--locked --release" | ||
|
|
||
| - release_for: Linux-arm64 | ||
| build_on: ubuntu-22.04-arm | ||
| target: "aarch64-unknown-linux-gnu" | ||
| args: "--locked --release" | ||
|
|
||
| runs-on: ${{ matrix.build_on }} | ||
|
|
||
| steps: | ||
| - name: checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| shared-key: "release" | ||
| workspaces: mcp-server -> target | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
|
|
||
| - name: Run cargo build | ||
| run: cargo build --target ${{ matrix.target }} ${{ matrix.args }} | ||
| working-directory: mcp-server | ||
|
|
||
| - name: rename binaries | ||
| run: | | ||
| mv target/${{ matrix.target }}/release/supernode-mcp${{ matrix.ext }} supernode-mcp-${{ matrix.release_for }}${{ matrix.ext }} | ||
|
|
||
| - name: upload | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: binaries-supernode-mcp-${{ matrix.release_for }} | ||
| path: supernode-mcp-${{ matrix.release_for }}${{ matrix.ext }} | ||
|
|
||
| docker: | ||
| runs-on: ubuntu-latest | ||
| needs: [build] | ||
|
|
||
| strategy: | ||
| matrix: | ||
| include: | ||
| - tags: ghcr.io/txpipe/metis-supernode-mcp,ghcr.io/txpipe/metis-supernode-mcp:${{ github.sha }} | ||
| binary: supernode-mcp | ||
|
|
||
|
Comment on lines
+63
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move dynamic tag generation out of the matrix definition. GitHub Actions does not interpolate expressions like 🔧 Proposed fixMove tag generation to a step that sets an output or environment variable, then reference it in the build step: strategy:
matrix:
include:
- - tags: ghcr.io/txpipe/metis-supernode-mcp,ghcr.io/txpipe/metis-supernode-mcp:${{ github.sha }}
- binary: supernode-mcp
+ - binary: supernode-mcp
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
+
+ - name: Prepare tags
+ id: tags
+ run: |
+ echo "tags=ghcr.io/txpipe/metis-supernode-mcp,ghcr.io/txpipe/metis-supernode-mcp:${{ github.sha }}" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3Then update line 107: - tags: ${{ matrix.tags }}
+ tags: ${{ steps.tags.outputs.tags }}🤖 Prompt for AI Agents |
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: binaries-* | ||
| merge-multiple: true | ||
| path: .github/image/bin | ||
|
|
||
| - uses: satackey/action-docker-layer-caching@v0.0.11 | ||
| continue-on-error: true | ||
|
|
||
| - name: Rename artifacts | ||
| run: |+ | ||
| mv .github/image/bin/supernode-mcp-Linux-x86_64 .github/image/bin/supernode-mcp-Linux-amd64 | ||
|
|
||
| - name: Build and push | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: .github/image | ||
| platforms: linux/arm64,linux/amd64 | ||
| push: true | ||
| tags: ${{ matrix.tags }} | ||
| build-args: BIN=${{ matrix.binary }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Check MCP server | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - ".github/workflows/check_mcp_server.yml" | ||
| - "mcp-server/**" | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - ".github/workflows/check_mcp_server.yml" | ||
| - "mcp-server/**" | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ./mcp-server | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Clippy check lints | ||
| run: cargo clippy -- -D warnings |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Test MCP server | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - ".github/workflows/test_mcp_server.yml" | ||
| - "mcp-server/**" | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - ".github/workflows/test_mcp_server.yml" | ||
| - "mcp-server/**" | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ./mcp-server | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Test | ||
| run: cargo test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| /cli/target | ||
| /backend/target | ||
| /operator/target | ||
| /mcp-server/target | ||
|
|
||
| .env | ||
| cert | ||
|
|
||
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.
Add missing
extproperty to matrix entries.Lines 50-51 and 57 reference
matrix.ext, but the matrix entries do not define this property, causing a workflow syntax error.🐛 Proposed fix
include: - release_for: Linux-x86_64 build_on: ubuntu-22.04 target: x86_64-unknown-linux-gnu args: "--locked --release" + ext: "" - release_for: Linux-arm64 build_on: ubuntu-22.04-arm target: "aarch64-unknown-linux-gnu" args: "--locked --release" + ext: ""📝 Committable suggestion
🤖 Prompt for AI Agents