Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,6 @@ jobs:
OLD_PATTERN='docker/cagent-action[^@]*@[a-f0-9]\{40\} # v[^ ]*'
# YAML sed: anchored on `uses:` to avoid false matches in comments
YAML_PIN_PATTERN='s|\(uses: *docker/cagent-action\)\([^@]*\)@[a-f0-9]\{40\} # v[^ ]*|\1\2@'"${SHA}"' # '"${VERSION}"'|g'
# Markdown sed: anchored on `docker/cagent-action` directly (no `uses:` prefix in code blocks)
MD_PIN_PATTERN='s|\(docker/cagent-action\)\([^@]*\)@[a-f0-9]\{40\} # v[^ ]*|\1\2@'"${SHA}"' # '"${VERSION}"'|g'

UPDATED_FILES=()

Expand All @@ -382,15 +380,6 @@ jobs:
--exclude-dir=.git \
review-pr/ .github/workflows/review-pr.yml .github/workflows/release.yml)

# Update Markdown files (broader pattern, no uses: anchor)
while IFS= read -r file; do
sed -i "$MD_PIN_PATTERN" "$file"
UPDATED_FILES+=("$file")
echo " Updated (md): $file"
done < <(grep -rl "$OLD_PATTERN" --include='*.md' \
--exclude-dir=.git \
.)

if [ ${#UPDATED_FILES[@]} -eq 0 ]; then
echo "No self-refs needed updating, skipping."
echo "skip=true" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# jobs:
# review:
# uses: docker/cagent-action/.github/workflows/review-pr.yml@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
# uses: docker/cagent-action/.github/workflows/review-pr.yml@VERSION
# # Scoped to the job so other jobs in this workflow aren't over-permissioned
# permissions:
# contents: read # Read repository files and PR diffs
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A GitHub Action for running [Docker Agent](https://github.com/docker/docker-agen
1. **Add the action to your workflow**:

```yaml
- uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action@VERSION
with:
agent: path/to/agent.yaml
prompt: "Analyze this code"
Expand Down Expand Up @@ -62,7 +62,7 @@ permissions:

jobs:
review:
uses: docker/cagent-action/.github/workflows/review-pr.yml@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action/.github/workflows/review-pr.yml@VERSION
# Scoped to the job so other jobs in this workflow aren't over-permissioned
permissions:
contents: read # Read repository files and PR diffs
Expand All @@ -84,7 +84,7 @@ See the [full PR Review documentation](review-pr/README.md) for more details.

```yaml
- name: Run Custom Agent
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: ./agents/my-agent.yaml
prompt: "Analyze the codebase"
Expand All @@ -95,7 +95,7 @@ See the [full PR Review documentation](review-pr/README.md) for more details.

```yaml
- name: Run Docker Agent with Custom Settings
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: docker/code-analyzer
prompt: "Analyze this codebase"
Expand All @@ -115,7 +115,7 @@ See the [full PR Review documentation](review-pr/README.md) for more details.
```yaml
- name: Run Docker Agent
id: agent
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: docker/code-analyzer
prompt: "Analyze this codebase"
Expand Down Expand Up @@ -245,14 +245,14 @@ jobs:
- uses: actions/checkout@v4

- name: Security Review
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: docker/github-action-security-scanner
prompt: "Analyze for security issues"
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Code Quality Analysis
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: docker/code-quality-analyzer
prompt: "Analyze code quality and best practices"
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
- uses: actions/checkout@v4

- name: Run Agent
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: ${{ github.event.inputs.agent }}
prompt: ${{ github.event.inputs.prompt }}
Expand Down
18 changes: 9 additions & 9 deletions review-pr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:

jobs:
review:
uses: docker/cagent-action/.github/workflows/review-pr.yml@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action/.github/workflows/review-pr.yml@VERSION
# Scoped to the job so other jobs in this workflow aren't over-permissioned
permissions:
contents: read # Read repository files and PR diffs
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
fetch-depth: 0
ref: refs/pull/${{ github.event.issue.number }}/head

- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -163,7 +163,7 @@ The recommended approach is to add an `AGENTS.md` file to your repository root.
For workflow-level overrides or guidelines that apply across multiple repos, use the `additional-prompt` input:

```yaml
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
additional-prompt: |
Expand All @@ -174,7 +174,7 @@ For workflow-level overrides or guidelines that apply across multiple repos, use
```

```yaml
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
additional-prompt: |
Expand All @@ -186,7 +186,7 @@ For workflow-level overrides or guidelines that apply across multiple repos, use

```yaml
# Project-specific conventions
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
additional-prompt: |
Expand All @@ -207,31 +207,31 @@ Override for more thorough or cost-effective reviews:

```yaml
# Anthropic (default provider)
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
model: anthropic/claude-opus-4 # More thorough reviews
```

```yaml
# OpenAI Codex
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
model: openai/codex-mini
```

```yaml
# Google Gemini
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
google-api-key: ${{ secrets.GOOGLE_API_KEY }}
model: gemini/gemini-2.0-flash
```

```yaml
# xAI Grok
- uses: docker/cagent-action/review-pr@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
- uses: docker/cagent-action/review-pr@VERSION
with:
xai-api-key: ${{ secrets.XAI_API_KEY }}
model: xai/grok-2
Expand Down
2 changes: 1 addition & 1 deletion security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ All tests must pass before deployment.
```yaml
- name: Run Agent
id: agent
uses: docker/cagent-action@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
uses: docker/cagent-action@VERSION
with:
agent: my-agent
prompt: "Analyze the logs"
Expand Down
Loading