-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
78 lines (69 loc) · 2.36 KB
/
action.yml
File metadata and controls
78 lines (69 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "DepsHub MCP"
description: "Installs the latest DepsHub MCP binary and exposes Codex config"
author: "DepsHub"
branding:
icon: "package"
color: "green"
inputs:
base-url:
description: "Base API URL for DepsHub MCP"
required: false
default: "https://mcp-api.depshub.com"
outputs:
codex_prompt:
description: "Prompt text for OpenAI Codex"
value: ${{ steps.prompt.outputs.prompt }}
codex_args:
description: "Arguments for MCP configuration"
value: ${{ steps.args.outputs.codex_args }}
runs:
using: "composite"
steps:
- name: Detect architecture
id: arch
shell: bash
run: |
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH=amd64 ;;
arm64|aarch64) ARCH=arm64 ;;
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
echo "arch=$ARCH" >> $GITHUB_OUTPUT
- name: Find latest DepsHub MCP release
id: version
shell: bash
run: |
TAG=$(curl -s https://api.github.com/repos/DepsHubHQ/mcp/releases/latest \
| grep '"tag_name":' \
| sed -E 's/.*"([^"]+)".*/\1/')
echo "Latest MCP version: $TAG"
echo "version=$TAG" >> $GITHUB_OUTPUT
- name: Download latest MCP binary
shell: bash
run: |
URL="https://github.com/DepsHubHQ/mcp/releases/download/${{ steps.version.outputs.version }}/depshub-linux-${{ steps.arch.outputs.arch }}"
echo "Downloading MCP binary: $URL"
curl -L "$URL" -o depshub-mcp
chmod +x depshub-mcp
- name: Load dynamic prompt from MCP
id: prompt
shell: bash
env:
BASE_URL: ${{ inputs.base-url }}
run: |
PROMPT=$(./depshub-mcp prompt)
PROMPT_FILE="$GITHUB_WORKSPACE/prompt.txt"
printf "%s" "$PROMPT" > "$PROMPT_FILE"
echo "prompt=$PROMPT_FILE" >> "$GITHUB_OUTPUT"
echo "Saved prompt to: $PROMPT_FILE"
- name: Build Codex MCP arguments
id: args
shell: bash
run: |
echo "codex_args=-c 'mcp_servers.depshub.command=\"./depshub-mcp\"' -c 'mcp_servers.depshub.args=[\"start\"]' -c 'sandbox_workspace_write.network_access=true' -c 'shell_environment_policy.ignore_default_excludes=true'" >> $GITHUB_OUTPUT
- name: Set Git identity
shell: bash
run: |
git config user.name "DepsHub"
git config user.email "support@depshub.com"