mirror of
https://github.com/markwylde/claude-code-gitea-action.git
synced 2026-01-29 11:23:31 +08:00
ci: support gitea secrets fallback
This commit is contained in:
3
.github/workflows/claude-review.yml
vendored
3
.github/workflows/claude-review.yml
vendored
@@ -29,5 +29,6 @@ jobs:
|
||||
- Documentation consistency: Verify that README.md and other documentation files are updated to reflect any code changes (especially new inputs, features, or configuration options)
|
||||
|
||||
Be constructive and specific in your feedback. Give inline comments where applicable.
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
allowed_tools: "mcp__github__create_pending_pull_request_review,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff"
|
||||
|
||||
3
.github/workflows/claude.yml
vendored
3
.github/workflows/claude.yml
vendored
@@ -33,7 +33,8 @@ jobs:
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
allowed_tools: "Bash(bun install),Bash(bun test:*),Bash(bun run format),Bash(bun typecheck)"
|
||||
custom_instructions: "You have also been granted tools for editing files and running bun commands (install, run, test, typecheck) for testing your changes: bun install, bun test, bun run format, bun typecheck."
|
||||
model: "claude-opus-4-20250514"
|
||||
|
||||
3
.github/workflows/issue-triage.yml
vendored
3
.github/workflows/issue-triage.yml
vendored
@@ -103,4 +103,5 @@ jobs:
|
||||
allowed_tools: "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues"
|
||||
mcp_config: /tmp/mcp-config/mcp-servers.json
|
||||
timeout_minutes: "5"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
|
||||
6
.github/workflows/test-base-action.yml
vendored
6
.github/workflows/test-base-action.yml
vendored
@@ -23,7 +23,8 @@ jobs:
|
||||
uses: ./base-action
|
||||
with:
|
||||
prompt: ${{ github.event.inputs.test_prompt || 'List the files in the current directory starting with "package"' }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
allowed_tools: "LS,Read"
|
||||
timeout_minutes: "3"
|
||||
|
||||
@@ -81,7 +82,8 @@ jobs:
|
||||
uses: ./base-action
|
||||
with:
|
||||
prompt_file: "test-prompt.txt"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
allowed_tools: "LS,Read"
|
||||
timeout_minutes: "3"
|
||||
|
||||
|
||||
3
.github/workflows/test-claude-env.yml
vendored
3
.github/workflows/test-claude-env.yml
vendored
@@ -19,7 +19,8 @@ jobs:
|
||||
with:
|
||||
prompt: |
|
||||
Use the Bash tool to run: echo "VAR1: $VAR1" && echo "VAR2: $VAR2"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_env: |
|
||||
# This is a comment
|
||||
VAR1: value1
|
||||
|
||||
@@ -49,7 +49,8 @@ jobs:
|
||||
with:
|
||||
prompt: |
|
||||
List the files in the current directory starting with "package"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
path_to_claude_code_executable: /home/runner/.local/bin/claude
|
||||
path_to_bun_executable: /home/runner/.bun/bin/bun
|
||||
allowed_tools: "LS,Read"
|
||||
|
||||
6
.github/workflows/test-mcp-servers.yml
vendored
6
.github/workflows/test-mcp-servers.yml
vendored
@@ -28,7 +28,8 @@ jobs:
|
||||
id: claude-test
|
||||
with:
|
||||
prompt: "List all available tools"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
env:
|
||||
# Change to test directory so it finds .mcp.json
|
||||
CLAUDE_WORKING_DIR: ${{ github.workspace }}/base-action/test/mcp-test
|
||||
@@ -109,7 +110,8 @@ jobs:
|
||||
id: claude-config-test
|
||||
with:
|
||||
prompt: "List all available tools"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
mcp_config: '{"mcpServers":{"test-server":{"type":"stdio","command":"bun","args":["simple-mcp-server.ts"],"env":{}}}}'
|
||||
env:
|
||||
# Change to test directory so bun can find the MCP server script
|
||||
|
||||
12
.github/workflows/test-settings.yml
vendored
12
.github/workflows/test-settings.yml
vendored
@@ -19,7 +19,8 @@ jobs:
|
||||
with:
|
||||
prompt: |
|
||||
Use Bash to echo "Hello from settings test"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
settings: |
|
||||
{
|
||||
"permissions": {
|
||||
@@ -69,7 +70,8 @@ jobs:
|
||||
with:
|
||||
prompt: |
|
||||
Use Bash to echo "This should not work"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
settings: |
|
||||
{
|
||||
"permissions": {
|
||||
@@ -112,7 +114,8 @@ jobs:
|
||||
with:
|
||||
prompt: |
|
||||
Use Bash to echo "Hello from settings file test"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
settings: "test-settings.json"
|
||||
timeout_minutes: "2"
|
||||
|
||||
@@ -167,7 +170,8 @@ jobs:
|
||||
with:
|
||||
prompt: |
|
||||
Use Bash to echo "This should not work from file"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY && secrets.ANTHROPIC_API_KEY || secrets.CLAUDE_CREDENTIALS }}
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }}
|
||||
settings: "test-settings.json"
|
||||
timeout_minutes: "2"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user