Skip to content

Commit ab2c594

Browse files
authored
fix: rename cagent binary to docker-agent (docker#109)
Signed-off-by: Derek Misler <derek.misler@docker.com>
1 parent 48be467 commit ab2c594

17 files changed

+152
-152
lines changed

.github/workflows/pr-describe.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ jobs:
195195
const descriptionFile = '${{ steps.generate.outputs.output-file }}';
196196
197197
try {
198-
// Read generated description and extract cagent-output block if present.
198+
// Read generated description and extract docker-agent-output block if present.
199199
// The composite action should already clean this, but the agent may
200200
// emit conversational text before the code fence that slips through.
201201
const raw = fs.readFileSync(descriptionFile, 'utf8');
202-
const fenceMatch = raw.match(/```cagent-output[\s\S]*?\n([\s\S]*?)```/);
202+
const fenceMatch = raw.match(/```docker-agent-output[\s\S]*?\n([\s\S]*?)```/);
203203
let description;
204204
if (fenceMatch) {
205205
description = fenceMatch[1].trim();

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ jobs:
122122
123123
# Create a detached commit (not on main) with the pinned refs
124124
# Note: write-tree captures the full index (all files from HEAD),
125-
# but we explicitly add CAGENT_VERSION for clarity.
126-
git add "${PINNED_FILES[@]}" CAGENT_VERSION
125+
# but we explicitly add DOCKER_AGENT_VERSION for clarity.
126+
git add "${PINNED_FILES[@]}" DOCKER_AGENT_VERSION
127127
TREE=$(git write-tree)
128128
RELEASE_SHA=$(git commit-tree "$TREE" -p HEAD -m "release: ${VERSION}")
129129
@@ -276,19 +276,19 @@ jobs:
276276
with:
277277
ref: ${{ needs.release.outputs.version }}
278278

279-
- name: Install cagent
279+
- name: Install Docker Agent
280280
run: |
281281
set -e
282-
CAGENT_VERSION=$(tr -d '[:space:]' < CAGENT_VERSION)
283-
if [ -z "$CAGENT_VERSION" ]; then
284-
echo "::error::Could not extract cagent version from CAGENT_VERSION"
282+
DOCKER_AGENT_VERSION=$(tr -d '[:space:]' < DOCKER_AGENT_VERSION)
283+
if [ -z "$DOCKER_AGENT_VERSION" ]; then
284+
echo "::error::Could not extract Docker Agent version from DOCKER_AGENT_VERSION"
285285
exit 1
286286
fi
287-
echo "Using cagent version from CAGENT_VERSION: ${CAGENT_VERSION}"
288-
curl -fL -o cagent \
289-
"https://github.com/docker/docker-agent/releases/download/${CAGENT_VERSION}/cagent-linux-amd64"
290-
chmod +x cagent
291-
sudo mv cagent /usr/local/bin/
287+
echo "Using Docker Agent version from DOCKER_AGENT_VERSION: ${DOCKER_AGENT_VERSION}"
288+
curl -fL -o docker-agent \
289+
"https://github.com/docker/docker-agent/releases/download/${DOCKER_AGENT_VERSION}/docker-agent-linux-amd64"
290+
chmod +x docker-agent
291+
sudo mv docker-agent /usr/local/bin/
292292
293293
- name: Docker Hub login
294294
env:
@@ -307,7 +307,7 @@ jobs:
307307
set -e
308308
if [ -z "${HUB_ORG}" ]; then echo "::error::HUB_ORG secret is not set"; exit 1; fi
309309
cd review-pr/agents
310-
TELEMETRY_ENABLED=false cagent share push pr-review.yaml "${HUB_ORG}/review-pr"
310+
TELEMETRY_ENABLED=false docker agent share push pr-review.yaml "${HUB_ORG}/review-pr"
311311
312312
- name: Upload README to Docker Hub
313313
env:

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
jobs:
1919
security-scan:
20-
name: Security Scan with cagent
20+
name: Security Scan with Docker Agent
2121
runs-on: ubuntu-latest
2222
env:
2323
HAS_APP_SECRETS: ${{ secrets.CAGENT_REVIEWER_APP_ID != '' }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
run: |
187187
OUTPUT_FILE="${{ steps.invalid-agent.outputs.output-file }}"
188188
189-
# Check exit code OR check for error in output (cagent may exit 0 even on pull failure)
189+
# Check exit code OR check for error in output (Docker Agent may exit 0 even on pull failure)
190190
if [ "${{ steps.invalid-agent.outputs.exit-code }}" == "0" ]; then
191191
# Exit code is 0, check if output contains error message
192192
if [ -f "$OUTPUT_FILE" ] && grep -q "failed to pull" "$OUTPUT_FILE"; then

.github/workflows/update-cagent-version.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Update cagent version
1+
name: Update Docker Agent version
22

33
on:
44
repository_dispatch:
55
types: [cagent-release]
66
workflow_dispatch:
77
inputs:
88
version:
9-
description: "cagent version (e.g., v1.28.1). Leave empty to use latest release."
9+
description: "Docker Agent version (e.g., v1.28.1). Leave empty to use latest release."
1010
required: false
1111
type: string
1212

@@ -43,8 +43,8 @@ jobs:
4343
VERSION="$DISPATCH_VERSION"
4444
echo "Using dispatched version: $VERSION"
4545
else
46-
echo "No version specified, fetching latest release from docker/cagent..."
47-
VERSION=$(gh release view --repo docker/cagent --json tagName --jq '.tagName')
46+
echo "No version specified, fetching latest release from docker/docker-agent..."
47+
VERSION=$(gh release view --repo docker/docker-agent --json tagName --jq '.tagName')
4848
echo "Latest release: $VERSION"
4949
fi
5050
@@ -55,9 +55,9 @@ jobs:
5555
GH_TOKEN: ${{ steps.app-token.outputs.token || secrets.RELEASE_TOKEN }}
5656
VERSION: ${{ steps.version.outputs.version }}
5757
run: |
58-
echo "Validating that $VERSION exists as a release on docker/cagent..."
59-
if ! gh release view "$VERSION" --repo docker/cagent > /dev/null 2>&1; then
60-
echo "❌ Release $VERSION not found on docker/cagent"
58+
echo "Validating that $VERSION exists as a release on docker/docker-agent..."
59+
if ! gh release view "$VERSION" --repo docker/docker-agent > /dev/null 2>&1; then
60+
echo "❌ Release $VERSION not found on docker/docker-agent"
6161
exit 1
6262
fi
6363
echo "✅ Release $VERSION exists"
@@ -67,7 +67,7 @@ jobs:
6767
env:
6868
VERSION: ${{ steps.version.outputs.version }}
6969
run: |
70-
CURRENT=$(cat CAGENT_VERSION | tr -d '[:space:]')
70+
CURRENT=$(cat DOCKER_AGENT_VERSION | tr -d '[:space:]')
7171
echo "Current version: $CURRENT"
7272
echo "Target version: $VERSION"
7373
@@ -80,13 +80,13 @@ jobs:
8080
echo "current=$CURRENT" >> "$GITHUB_OUTPUT"
8181
fi
8282
83-
- name: Update CAGENT_VERSION
83+
- name: Update DOCKER_AGENT_VERSION
8484
if: steps.check.outputs.skip != 'true'
8585
env:
8686
VERSION: ${{ steps.version.outputs.version }}
8787
run: |
88-
echo "$VERSION" > CAGENT_VERSION
89-
echo "Updated CAGENT_VERSION to $VERSION"
88+
echo "$VERSION" > DOCKER_AGENT_VERSION
89+
echo "Updated DOCKER_AGENT_VERSION to $VERSION"
9090
9191
- name: Create or update PR
9292
if: steps.check.outputs.skip != 'true'
@@ -95,7 +95,7 @@ jobs:
9595
VERSION: ${{ steps.version.outputs.version }}
9696
CURRENT: ${{ steps.check.outputs.current }}
9797
run: |
98-
BRANCH="auto/update-cagent-version"
98+
BRANCH="auto/update-docker-agent-version"
9999
RELEASE_URL="https://github.com/docker/docker-agent/releases/tag/$VERSION"
100100
101101
# Configure git
@@ -104,8 +104,8 @@ jobs:
104104
105105
# Create or reset branch
106106
git checkout -B "$BRANCH"
107-
git add CAGENT_VERSION
108-
git commit -m "chore: update cagent to $VERSION"
107+
git add DOCKER_AGENT_VERSION
108+
git commit -m "chore: update Docker Agent to $VERSION"
109109
110110
# Force-push to handle both new and existing branches.
111111
# This branch is exclusively managed by this workflow, so --force is safe.
@@ -117,25 +117,25 @@ jobs:
117117
if [ -n "$EXISTING_PR" ]; then
118118
echo "Updating existing PR #$EXISTING_PR"
119119
gh pr edit "$EXISTING_PR" \
120-
--title "chore: update cagent to $VERSION" \
120+
--title "chore: update Docker Agent to $VERSION" \
121121
--body "$(cat <<EOF
122122
## Summary
123-
Updates \`CAGENT_VERSION\` from \`$CURRENT\` to \`$VERSION\`.
123+
Updates \`DOCKER_AGENT_VERSION\` from \`$CURRENT\` to \`$VERSION\`.
124124
- **Release**: [$VERSION]($RELEASE_URL)
125125
- **Triggered by**: \`${{ github.event_name }}\`
126-
> Auto-generated by the [update-cagent-version](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow.
126+
> Auto-generated by the [update-docker-agent-version](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow.
127127
EOF
128128
)"
129129
else
130130
echo "Creating new PR"
131131
gh pr create \
132-
--title "chore: update cagent to $VERSION" \
132+
--title "chore: update Docker Agent to $VERSION" \
133133
--body "$(cat <<EOF
134134
## Summary
135-
Updates \`CAGENT_VERSION\` from \`$CURRENT\` to \`$VERSION\`.
135+
Updates \`DOCKER_AGENT_VERSION\` from \`$CURRENT\` to \`$VERSION\`.
136136
- **Release**: [$VERSION]($RELEASE_URL)
137137
- **Triggered by**: \`${{ github.event_name }}\`
138-
> Auto-generated by the [update-cagent-version](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow.
138+
> Auto-generated by the [update-docker-agent-version](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow.
139139
EOF
140140
)" \
141141
--label "kind/dependencies"

CAGENT_VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

DOCKER_AGENT_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.36.1

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cagent GitHub Action
22

3-
A GitHub Action for running [Docker Agent](https://github.com/docker/docker-agent) AI agents in your workflows. This action simplifies the setup and execution of cagent, handling binary downloads and environment configuration automatically.
3+
A GitHub Action for running [Docker Agent](https://github.com/docker/docker-agent) AI agents in your workflows. This action simplifies the setup and execution of Docker Agent, handling binary downloads and environment configuration automatically.
44

55
## Quick Start
66

@@ -19,7 +19,7 @@ A GitHub Action for running [Docker Agent](https://github.com/docker/docker-agen
1919
- Add `ANTHROPIC_API_KEY` (or another provider's key) from [Anthropic Console](https://console.anthropic.com/)
2020

2121
3. **That's it!** The action will automatically:
22-
- Download the cagent binary
22+
- Download the Docker Agent binary
2323
- Run your specified agent
2424
- Scan outputs for leaked secrets
2525
- Provide results in workflow logs
@@ -92,7 +92,7 @@ See the [full PR Review documentation](review-pr/README.md) for more details.
9292
### Advanced Configuration
9393
9494
```yaml
95-
- name: Run cagent with Custom Settings
95+
- name: Run Docker Agent with Custom Settings
9696
uses: docker/cagent-action@latest
9797
with:
9898
agent: docker/code-analyzer
@@ -111,7 +111,7 @@ See the [full PR Review documentation](review-pr/README.md) for more details.
111111
### Using Outputs
112112
113113
```yaml
114-
- name: Run cagent
114+
- name: Run Docker Agent
115115
id: agent
116116
uses: docker/cagent-action@latest
117117
with:
@@ -158,16 +158,16 @@ See the [full PR Review documentation](review-pr/README.md) for more details.
158158
| `yolo` | Auto-approve all prompts (`true`/`false`) | No | `true` |
159159
| `max-retries` | Maximum number of retries on failure (0 = no retries) | No | `2` |
160160
| `retry-delay` | Base delay in seconds between retries (doubles each attempt) | No | `5` |
161-
| `extra-args` | Additional arguments to pass to `cagent run` | No | - |
161+
| `extra-args` | Additional arguments to pass to `docker agent run` | No | - |
162162
| `add-prompt-files` | Comma-separated list of files to append to the prompt (e.g., `AGENTS.md,CLAUDE.md`) | No | - |
163163

164164
### Prompt Files (`add-prompt-files`)
165165

166-
The `add-prompt-files` input allows you to include additional context files as system messages. This uses cagent's `--prompt-file` flag under the hood.
166+
The `add-prompt-files` input allows you to include additional context files as system messages. This uses Docker Agent's `--prompt-file` flag under the hood.
167167

168168
> **Note:** The `review-pr` action automatically reads `AGENTS.md` and `CLAUDE.md` from the repository root — you don't need to specify them via `add-prompt-files`. Use this input for additional files beyond those defaults.
169169

170-
**File Resolution (handled by cagent):**
170+
**File Resolution (handled by Docker Agent):**
171171

172172
- Searches up the directory hierarchy (like `.gitignore`)
173173
- Also checks the home folder (`~/`)
@@ -188,7 +188,7 @@ add-prompt-files: "STYLE_GUIDE.md" # Found via hierarchy search
188188

189189
| Output | Description |
190190
| ----------------------- | -------------------------------------------------------- |
191-
| `exit-code` | Exit code from cagent run |
191+
| `exit-code` | Exit code from docker agent run |
192192
| `output-file` | Path to the output log file |
193193
| `mcp-gateway-installed` | Whether mcp-gateway was installed (`true`/`false`) |
194194
| `execution-time` | Agent execution time in seconds |

0 commit comments

Comments
 (0)