Repository navigation
ci(OP-3891): authenticate Claude with workload identity federation #7605
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "+ Claude Code / Interactive" | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| issues: | |
| types: [opened, assigned, labeled] | |
| pull_request: | |
| types: [opened, assigned, labeled] | |
| pull_request_review: | |
| types: [submitted] | |
| workflow_dispatch: | |
| 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'))) || | |
| (github.event_name == 'pull_request' && (contains(github.event.pull_request.body, '@claude') || contains(github.event.pull_request.title, '@claude'))) || | |
| github.event_name == 'workflow_dispatch' | |
| uses: ./.github/workflows/_claude-code.yml | |
| permissions: | |
| actions: read # github_ci MCP server of claude-code-action in _claude-code.yml reads workflow runs and job logs | |
| contents: read | |
| id-token: write # anthropics/claude-code-action in _claude-code.yml exchanges the OIDC token for the Claude App token and the Anthropic API token | |
| pull-requests: read # github_ci MCP server of claude-code-action in _claude-code.yml reads the pull request (pulls.get) | |
| with: | |
| mode: 'interactive' | |
| track_progress: ${{ github.event_name != 'workflow_dispatch' && true || false }} |