-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (73 loc) · 2.5 KB
/
Copy pathclaude-assistant.yaml
File metadata and controls
76 lines (73 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Claude Code Assistant on Issues and PRs
on:
issue_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review_comment:
types: [created]
jobs:
check-allowlist:
runs-on: ubuntu-latest
outputs:
allowed: ${{ steps.check.outputs.allowed }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Check sender against allowlist
id: check
run: |
if grep -qxF "${{ github.event.sender.login }}" \
<(grep -v '^#' .github/claude-allowed-users | sed '/^[[:space:]]*$/d'); then
echo "allowed=true" >> $GITHUB_OUTPUT
else
echo "allowed=false" >> $GITHUB_OUTPUT
fi
claude:
environment: claude
needs: check-allowlist
if: needs.check-allowlist.outputs.allowed == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.CORTEX_AI_AGENTS_APP_ID }}
private-key: ${{ secrets.CORTEX_AI_AGENTS_CLIENT_PKEY }}
- uses: ./.github/actions/setup-claude-code-action
- uses: ./.github/actions/start-litellm-proxy
env:
AICORE_RESOURCE_GROUP: ${{ secrets.AICORE_RESOURCE_GROUP }}
AICORE_BASE_URL: ${{ secrets.AICORE_BASE_URL }}
AICORE_AUTH_URL: ${{ secrets.AICORE_AUTH_URL }}
AICORE_CLIENT_ID: ${{ secrets.AICORE_CLIENT_ID }}
AICORE_CLIENT_SECRET: ${{ secrets.AICORE_CLIENT_SECRET }}
- uses: ./.claude-code-action
with:
claude_args: |
--max-turns 1000
--permission-mode auto
--allowedTools "Read,Write,Edit,Bash(*),WebSearch,WebFetch"
trigger_phrase: "@claude"
include_comments_by_actor: "auhlig,umswmayj,juliusclausnitzer,mblos,PhilippMatthes,Varsius,henrichter,SoWieMarkus,*[bot]"
use_litellm: "true"
litellm_model: "sap/anthropic--claude-4.6-opus"
github_token: ${{ steps.app-token.outputs.token }}
bot_id: "279748396"
bot_name: "cortex-ai-agents[bot]"
show_full_output: "true"
- uses: ./.github/actions/stop-litellm-proxy
if: always()