|
1 | | -name: 'CAgent Runner' |
2 | | -description: 'Run a CAgent AI agent with a single line' |
3 | | -author: 'Docker' |
| 1 | +name: "CAgent Runner" |
| 2 | +description: "Run a CAgent AI agent with a single line" |
| 3 | +author: "Docker" |
4 | 4 | branding: |
5 | | - icon: 'cpu' |
6 | | - color: 'blue' |
| 5 | + icon: "cpu" |
| 6 | + color: "blue" |
7 | 7 |
|
8 | 8 | inputs: |
9 | 9 | agent: |
10 | | - description: 'Agent identifier (e.g., jeanlaurent/pr-reviewer or path to .yaml file)' |
| 10 | + description: "Agent identifier (e.g., jeanlaurent/pr-reviewer or path to .yaml file)" |
11 | 11 | required: true |
12 | 12 | prompt: |
13 | | - description: 'Prompt to pass to the agent. If not provided, uses a default based on the agent type' |
| 13 | + description: "Prompt to pass to the agent. If not provided, uses a default based on the agent type" |
14 | 14 | required: false |
15 | 15 | cagent-version: |
16 | | - description: 'Version of cagent to use' |
| 16 | + description: "Version of cagent to use" |
17 | 17 | required: false |
18 | | - default: 'v1.6.6' |
| 18 | + default: "v1.6.6" |
19 | 19 | mcp-gateway: |
20 | | - description: 'Install mcp-gateway (true/false)' |
| 20 | + description: "Install mcp-gateway (true/false)" |
21 | 21 | required: false |
22 | | - default: 'false' |
| 22 | + default: "false" |
23 | 23 | mcp-gateway-version: |
24 | | - description: 'Version of mcp-gateway to use (specifying this will enable mcp-gateway installation)' |
| 24 | + description: "Version of mcp-gateway to use (specifying this will enable mcp-gateway installation)" |
25 | 25 | required: false |
26 | | - default: 'v0.22.0' |
| 26 | + default: "v0.22.0" |
27 | 27 | anthropic-api-key: |
28 | | - description: 'Anthropic API key (defaults to ANTHROPIC_API_KEY secret)' |
| 28 | + description: "Anthropic API key (defaults to ANTHROPIC_API_KEY secret)" |
29 | 29 | required: false |
30 | 30 | openai-api-key: |
31 | | - description: 'OpenAI API key (defaults to OPENAI_API_KEY secret)' |
| 31 | + description: "OpenAI API key (defaults to OPENAI_API_KEY secret)" |
32 | 32 | required: false |
33 | 33 | google-api-key: |
34 | | - description: 'Google API key for Gemini (defaults to GOOGLE_API_KEY secret)' |
| 34 | + description: "Google API key for Gemini (defaults to GOOGLE_API_KEY secret)" |
35 | 35 | required: false |
36 | 36 | github-token: |
37 | | - description: 'GitHub token for API access' |
| 37 | + description: "GitHub token for API access" |
38 | 38 | required: false |
39 | 39 | default: ${{ github.token }} |
40 | 40 | timeout: |
41 | | - description: 'Timeout in seconds for agent execution (0 for no timeout)' |
| 41 | + description: "Timeout in seconds for agent execution (0 for no timeout)" |
42 | 42 | required: false |
43 | | - default: '0' |
| 43 | + default: "0" |
44 | 44 | debug: |
45 | | - description: 'Enable debug mode with verbose logging (true/false)' |
| 45 | + description: "Enable debug mode with verbose logging (true/false)" |
46 | 46 | required: false |
47 | | - default: 'false' |
| 47 | + default: "false" |
48 | 48 | working-directory: |
49 | | - description: 'Working directory to run the agent in' |
| 49 | + description: "Working directory to run the agent in" |
50 | 50 | required: false |
51 | | - default: '.' |
| 51 | + default: "." |
52 | 52 | tui: |
53 | | - description: 'Enable TUI mode (true/false)' |
| 53 | + description: "Enable TUI mode (true/false)" |
54 | 54 | required: false |
55 | | - default: 'false' |
| 55 | + default: "false" |
56 | 56 | yolo: |
57 | | - description: 'Enable yolo mode - auto-approve all prompts (true/false)' |
| 57 | + description: "Enable yolo mode - auto-approve all prompts (true/false)" |
58 | 58 | required: false |
59 | | - default: 'true' |
| 59 | + default: "true" |
60 | 60 | extra-args: |
61 | | - description: 'Additional arguments to pass to cagent run' |
| 61 | + description: "Additional arguments to pass to cagent run" |
62 | 62 | required: false |
63 | | - default: '' |
| 63 | + default: "" |
64 | 64 |
|
65 | 65 | outputs: |
66 | 66 | exit-code: |
67 | | - description: 'Exit code from cagent run' |
| 67 | + description: "Exit code from cagent run" |
68 | 68 | value: ${{ steps.run-agent.outputs.exit-code }} |
69 | 69 | output-file: |
70 | | - description: 'Path to the output log file' |
| 70 | + description: "Path to the output log file" |
71 | 71 | value: ${{ steps.run-agent.outputs.output-file }} |
72 | 72 | cagent-version: |
73 | | - description: 'Version of cagent that was used' |
| 73 | + description: "Version of cagent that was used" |
74 | 74 | value: ${{ steps.setup-binaries.outputs.cagent-version }} |
75 | 75 | mcp-gateway-installed: |
76 | | - description: 'Whether mcp-gateway was installed (true/false)' |
| 76 | + description: "Whether mcp-gateway was installed (true/false)" |
77 | 77 | value: ${{ steps.setup-binaries.outputs.mcp-installed }} |
78 | 78 | execution-time: |
79 | | - description: 'Agent execution time in seconds' |
| 79 | + description: "Agent execution time in seconds" |
80 | 80 | value: ${{ steps.run-agent.outputs.execution-time }} |
81 | 81 |
|
82 | 82 | runs: |
83 | | - using: 'composite' |
| 83 | + using: "composite" |
84 | 84 | steps: |
85 | 85 | - name: Validate versions |
86 | 86 | shell: bash |
@@ -108,15 +108,15 @@ runs: |
108 | 108 |
|
109 | 109 | - name: Cache cagent binary |
110 | 110 | id: cache-cagent |
111 | | - uses: actions/cache@v4 |
| 111 | + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 |
112 | 112 | with: |
113 | 113 | path: ${{ github.workspace }}/cagent |
114 | 114 | key: cagent-${{ runner.os }}-${{ inputs.cagent-version }} |
115 | 115 |
|
116 | 116 | - name: Cache mcp-gateway binary |
117 | 117 | id: cache-mcp |
118 | 118 | if: ${{ inputs.mcp-gateway == 'true' }} |
119 | | - uses: actions/cache@v4 |
| 119 | + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 |
120 | 120 | with: |
121 | 121 | path: ~/.docker/cli-plugins/docker-mcp |
122 | 122 | key: mcp-gateway-${{ runner.os }}-${{ inputs.mcp-gateway-version }} |
@@ -310,4 +310,8 @@ runs: |
310 | 310 | echo "::debug::Output file: $OUTPUT_FILE" |
311 | 311 | fi |
312 | 312 |
|
| 313 | + echo "" |
| 314 | + echo "---" |
| 315 | + echo "" |
| 316 | +
|
313 | 317 | exit $EXIT_CODE |
0 commit comments