Skip to content

Commit 7992ea4

Browse files
authored
updated to latest cagent version and added a workflow to create a latest tag on every release
of cagent-action (#19)
1 parent 1f7ec04 commit 7992ea4

File tree

6 files changed

+49
-15
lines changed

6 files changed

+49
-15
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
update-latest-tag:
13+
name: Update latest tag
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Update latest tag
22+
run: |
23+
git config user.name "github-actions[bot]"
24+
git config user.email "github-actions[bot]@users.noreply.github.com"
25+
26+
# Delete the existing latest tag if it exists (both locally and remotely)
27+
git tag -d latest 2>/dev/null || true
28+
git push origin :refs/tags/latest 2>/dev/null || true
29+
30+
# Create new latest tag pointing to the current commit
31+
git tag latest
32+
git push origin latest
33+
34+
echo "✅ Updated 'latest' tag to point to ${{ github.ref_name }}"

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A GitHub Action for running [cagent](https://github.com/docker/cagent) AI agents
77
1. **Add the action to your workflow**:
88

99
```yaml
10-
- uses: docker/cagent-action@v1.0.4
10+
- uses: docker/cagent-action@latest
1111
with:
1212
agent: docker/code-analyzer
1313
prompt: "Analyze this code"
@@ -42,7 +42,7 @@ See [security/README.md](security/README.md) for complete security documentation
4242

4343
```yaml
4444
- name: Run CAgent
45-
uses: docker/cagent-action@v1.0.4
45+
uses: docker/cagent-action@latest
4646
with:
4747
agent: docker/github-action-security-scanner
4848
prompt: "Analyze these commits for security vulnerabilities"
@@ -78,7 +78,7 @@ jobs:
7878

7979
- name: Analyze Changes
8080
id: analysis
81-
uses: docker/cagent-action@v1.0.4
81+
uses: docker/cagent-action@latest
8282
with:
8383
agent: docker/code-analyzer
8484
prompt: |
@@ -102,7 +102,7 @@ jobs:
102102

103103
```yaml
104104
- name: Run Custom Agent
105-
uses: docker/cagent-action@v1.0.4
105+
uses: docker/cagent-action@latest
106106
with:
107107
agent: ./agents/my-agent.yaml
108108
prompt: "Analyze the codebase"
@@ -114,11 +114,11 @@ jobs:
114114

115115
```yaml
116116
- name: Run CAgent with Custom Settings
117-
uses: docker/cagent-action@v1.0.4
117+
uses: docker/cagent-action@latest
118118
with:
119119
agent: docker/code-analyzer
120120
prompt: "Analyze this codebase"
121-
cagent-version: v1.9.11
121+
cagent-version: v1.19.4
122122
mcp-gateway: true # Set to true to install mcp-gateway
123123
mcp-gateway-version: v0.22.0
124124
yolo: false # Require manual approval
@@ -135,7 +135,7 @@ jobs:
135135
```yaml
136136
- name: Run CAgent
137137
id: agent
138-
uses: docker/cagent-action@v1.0.4
138+
uses: docker/cagent-action@latest
139139
with:
140140
agent: docker/code-analyzer
141141
prompt: "Analyze this codebase"
@@ -163,7 +163,7 @@ jobs:
163163
| --------------------- | ------------------------------------------------------------------------------------ | -------- | ------------------------------- |
164164
| `agent` | Agent identifier (e.g., `docker/code-analyzer`) or path to `.yaml` file | Yes | - |
165165
| `prompt` | Prompt to pass to the agent | No | - |
166-
| `cagent-version` | Version of cagent to use | No | `v1.15.6` |
166+
| `cagent-version` | Version of cagent to use | No | `v1.19.4` |
167167
| `mcp-gateway` | Install mcp-gateway (`true`/`false`) | No | `false` |
168168
| `mcp-gateway-version` | Version of mcp-gateway to use (specifying this will enable mcp-gateway installation) | No | `v0.22.0` |
169169
| `anthropic-api-key` | Anthropic API key | No | `$ANTHROPIC_API_KEY` env var |
@@ -229,15 +229,15 @@ jobs:
229229
- uses: actions/checkout@v4
230230
231231
- name: Security Review
232-
uses: docker/cagent-action@v1.0.4
232+
uses: docker/cagent-action@latest
233233
with:
234234
agent: docker/github-action-security-scanner
235235
prompt: "Analyze for security issues"
236236
env:
237237
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
238238
239239
- name: Code Quality Analysis
240-
uses: docker/cagent-action@v1.0.4
240+
uses: docker/cagent-action@latest
241241
with:
242242
agent: docker/code-quality-analyzer
243243
prompt: "Analyze code quality and best practices"
@@ -267,7 +267,7 @@ jobs:
267267
- uses: actions/checkout@v4
268268
269269
- name: Run Agent
270-
uses: docker/cagent-action@v1.0.4
270+
uses: docker/cagent-action@latest
271271
with:
272272
agent: ${{ github.event.inputs.agent }}
273273
prompt: ${{ github.event.inputs.prompt }}

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
cagent-version:
1616
description: "Version of cagent to use"
1717
required: false
18-
default: "v1.15.6"
18+
default: "v1.19.4"
1919
mcp-gateway:
2020
description: "Install mcp-gateway (true/false)"
2121
required: false

examples/code-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Analyze Code Changes
3030
id: analysis
31-
uses: docker/cagent-action@v1.0.4
31+
uses: docker/cagent-action@latest
3232
with:
3333
agent: docker/code-analyzer
3434
prompt: |

security/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ All tests must pass before deployment.
196196
```yaml
197197
- name: Run Agent
198198
id: agent
199-
uses: docker/cagent-action@v1.0.4
199+
uses: docker/cagent-action@latest
200200
with:
201201
agent: my-agent
202202
prompt: "Analyze the logs"

tests/test-job-summary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ echo "---"
3535
echo "| Agent | \`agents/security-scanner.yaml\` |"
3636
echo "| Exit Code | 0 |"
3737
echo "| Execution Time | 45s |"
38-
echo "| CAgent Version | v1.15.6 |"
38+
echo "| CAgent Version | v1.19.4 |"
3939
echo "| MCP Gateway | false |"
4040
echo ""
4141
echo "✅ **Status:** Success"

0 commit comments

Comments
 (0)