Skip to content

stuff for sublime #1499

stuff for sublime

stuff for sublime #1499

Workflow file for this run

name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(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
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read # Required for Claude to read CI results on PRs
env:
# Repository variable CLAUDE_MAX_TURNS (Settings → Secrets and variables → Actions → Variables), default 100
CLAUDE_MAX_TURNS: ${{ vars.CLAUDE_MAX_TURNS || '100' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
# Temporary fork pin with fix for execution-log loss on max-turns.
# Revert to anthropics/claude-code-action@<v1-SHA> once upstream PR lands:
# https://github.com/anthropics/claude-code-action/pull/1253
uses: STRd6/claude-code-action@be3b21a974a263b4a592276c2d732fb6bbd92e7b
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: "This is the Civet programming language compiler. Source is in source/ written in .civet files, compiled to dist/. Run `pnpm build` before `pnpm test`."
additional_permissions: |
actions: read
show_full_output: ${{ runner.debug == '1' }}
display_report: true
track_progress: true
claude_args: |
--model claude-opus-4-7
--allowedTools Edit,MultiEdit,Write,Read,Glob,Grep,LS,Bash(git:*),Bash(pnpm build:*),Bash(pnpm test:*),Bash(gh pr:*),Bash(gh issue:*)
--max-turns ${{ env.CLAUDE_MAX_TURNS }}
- name: Upload Claude log
if: always() && steps.claude.outputs.execution_file
run: aws s3 cp "${{ steps.claude.outputs.execution_file }}" "s3://${{ secrets.CLAUDE_LOG_BUCKET }}/claude-logs/${{ github.repository }}/${{ github.run_id }}-${{ github.run_attempt }}.log"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION || 'us-east-1' }}