From 58c5fee63699093dcbd5e15abace27ad7b17f808 Mon Sep 17 00:00:00 2001 From: Chris Mungall Date: Fri, 1 May 2026 20:07:52 -0700 Subject: [PATCH] Support CBORG Claude action setup --- .github/actions/claude-code-action/action.yml | 31 +++++++++++++++++-- .../claude-issue-triage-action/action.yml | 4 +++ .github/workflows/claude.yml | 6 ++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.github/actions/claude-code-action/action.yml b/.github/actions/claude-code-action/action.yml index 8e57c63..c9d6084 100644 --- a/.github/actions/claude-code-action/action.yml +++ b/.github/actions/claude-code-action/action.yml @@ -8,6 +8,9 @@ inputs: anthropic_api_key: description: "Anthropic API key" required: true + cborg_api_key: + description: "CBORG API key" + required: true prompt: description: "The prompt to send to Claude Code" required: false @@ -32,10 +35,18 @@ inputs: description: "Whether to install the GitHub MCP server" required: false default: "false" + install_artl_mcp: + description: "Whether to install the ARTL MCP server" + required: false + default: "false" + runs: using: "composite" steps: + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Install Claude Code shell: bash run: npm install -g @anthropic-ai/claude-code @@ -55,10 +66,21 @@ runs: "ghcr.io/github/github-mcp-server:sha-ff3036d" ], "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ inputs.GITHUB_TOKEN }}" + "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ inputs.github_token }}" } }' + - name: Install ARTL MCP Server + if: inputs.install_artl_mcp == 'true' + shell: bash + run: | + claude mcp add-json artl '{ + "command": "uvx", + "args": [ + "artl-mcp" + ] + }' + - name: Prepare Prompt File shell: bash id: prepare_prompt @@ -131,6 +153,11 @@ runs: echo "Complete output saved to output.json, final response saved to ${{ inputs.output_file }}" fi + env: - ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }} + # CBORG uses ANTHROPIC_AUTH_TOKEN; Claude Code still expects ANTHROPIC_API_KEY. + ANTHROPIC_API_KEY: "." + ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }} GITHUB_TOKEN: ${{ inputs.github_token }} + ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov" + DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1" diff --git a/.github/actions/claude-issue-triage-action/action.yml b/.github/actions/claude-issue-triage-action/action.yml index 666efa2..22fcd82 100644 --- a/.github/actions/claude-issue-triage-action/action.yml +++ b/.github/actions/claude-issue-triage-action/action.yml @@ -9,6 +9,9 @@ inputs: anthropic_api_key: description: "Anthropic API key" required: true + cborg_api_key: + description: "CBORG API key" + required: true github_token: description: "GitHub token with repo and issues permissions" required: true @@ -84,4 +87,5 @@ runs: install_github_mcp: "true" timeout_minutes: ${{ inputs.timeout_minutes }} anthropic_api_key: ${{ inputs.anthropic_api_key }} + cborg_api_key: ${{ inputs.cborg_api_key }} github_token: ${{ inputs.github_token }} diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index e1d4a43..efed7d1 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -1,3 +1,8 @@ +# Claude Code GitHub action +# --- +# This github action is from the copier template in https://github.com/ai4curation/github-ai-integrations, donated by the Monarch Initiative +# For more documentation, see https://ai4curation.github.io/aidocs/how-tos/set-up-github-actions/ +# Author: Chris Mungall (@cmungall) name: Claude Code on: @@ -18,6 +23,7 @@ jobs: (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) runs-on: ubuntu-latest + timeout-minutes: 25 permissions: contents: write pull-requests: write