|
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 (defaults to GITHUB_TOKEN env var)" |
38 | 38 | required: false |
39 | | - default: ${{ github.token }} |
40 | 39 | timeout: |
41 | | - description: 'Timeout in seconds for agent execution (0 for no timeout)' |
| 40 | + description: "Timeout in seconds for agent execution (0 for no timeout)" |
42 | 41 | required: false |
43 | | - default: '0' |
| 42 | + default: "0" |
44 | 43 | debug: |
45 | | - description: 'Enable debug mode with verbose logging (true/false)' |
| 44 | + description: "Enable debug mode with verbose logging (true/false)" |
46 | 45 | required: false |
47 | | - default: 'false' |
| 46 | + default: "false" |
48 | 47 | working-directory: |
49 | | - description: 'Working directory to run the agent in' |
| 48 | + description: "Working directory to run the agent in" |
50 | 49 | required: false |
51 | | - default: '.' |
| 50 | + default: "." |
52 | 51 | tui: |
53 | | - description: 'Enable TUI mode (true/false)' |
| 52 | + description: "Enable TUI mode (true/false)" |
54 | 53 | required: false |
55 | | - default: 'false' |
| 54 | + default: "false" |
56 | 55 | yolo: |
57 | | - description: 'Enable yolo mode - auto-approve all prompts (true/false)' |
| 56 | + description: "Enable yolo mode - auto-approve all prompts (true/false)" |
58 | 57 | required: false |
59 | | - default: 'true' |
| 58 | + default: "true" |
60 | 59 | extra-args: |
61 | | - description: 'Additional arguments to pass to cagent run' |
| 60 | + description: "Additional arguments to pass to cagent run" |
62 | 61 | required: false |
63 | | - default: '' |
| 62 | + default: "" |
64 | 63 |
|
65 | 64 | outputs: |
66 | 65 | exit-code: |
67 | | - description: 'Exit code from cagent run' |
| 66 | + description: "Exit code from cagent run" |
68 | 67 | value: ${{ steps.run-agent.outputs.exit-code }} |
69 | 68 | output-file: |
70 | | - description: 'Path to the output log file' |
| 69 | + description: "Path to the output log file" |
71 | 70 | value: ${{ steps.run-agent.outputs.output-file }} |
72 | 71 | cagent-version: |
73 | | - description: 'Version of cagent that was used' |
| 72 | + description: "Version of cagent that was used" |
74 | 73 | value: ${{ steps.setup-binaries.outputs.cagent-version }} |
75 | 74 | mcp-gateway-installed: |
76 | | - description: 'Whether mcp-gateway was installed (true/false)' |
| 75 | + description: "Whether mcp-gateway was installed (true/false)" |
77 | 76 | value: ${{ steps.setup-binaries.outputs.mcp-installed }} |
78 | 77 | execution-time: |
79 | | - description: 'Agent execution time in seconds' |
| 78 | + description: "Agent execution time in seconds" |
80 | 79 | value: ${{ steps.run-agent.outputs.execution-time }} |
81 | 80 |
|
82 | 81 | runs: |
83 | | - using: 'composite' |
| 82 | + using: "composite" |
84 | 83 | steps: |
85 | 84 | - name: Validate versions |
86 | 85 | shell: bash |
@@ -108,15 +107,15 @@ runs: |
108 | 107 |
|
109 | 108 | - name: Cache cagent binary |
110 | 109 | id: cache-cagent |
111 | | - uses: actions/cache@v4 |
| 110 | + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 |
112 | 111 | with: |
113 | 112 | path: ${{ github.workspace }}/cagent |
114 | 113 | key: cagent-${{ runner.os }}-${{ inputs.cagent-version }} |
115 | 114 |
|
116 | 115 | - name: Cache mcp-gateway binary |
117 | 116 | id: cache-mcp |
118 | 117 | if: ${{ inputs.mcp-gateway == 'true' }} |
119 | | - uses: actions/cache@v4 |
| 118 | + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 |
120 | 119 | with: |
121 | 120 | path: ~/.docker/cli-plugins/docker-mcp |
122 | 121 | key: mcp-gateway-${{ runner.os }}-${{ inputs.mcp-gateway-version }} |
@@ -206,7 +205,7 @@ runs: |
206 | 205 | ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key || env.ANTHROPIC_API_KEY }} |
207 | 206 | OPENAI_API_KEY: ${{ inputs.openai-api-key || env.OPENAI_API_KEY }} |
208 | 207 | GOOGLE_API_KEY: ${{ inputs.google-api-key || env.GOOGLE_API_KEY }} |
209 | | - GITHUB_PERSONAL_ACCESS_TOKEN: ${{ inputs.github-token }} |
| 208 | + GITHUB_PERSONAL_ACCESS_TOKEN: ${{ inputs.github-token || github.token }} |
210 | 209 | run: | |
211 | 210 | set -e |
212 | 211 |
|
|
0 commit comments