ci: ANTHROPIC_API_KEY 未設定時はジョブをスキップ #1
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: 採点くん | ||
| on: | ||
| pull_request: | ||
| types: [opened] | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| jobs: | ||
| grade: | ||
| if: ${{ secrets.ANTHROPIC_API_KEY != '' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - run: npm ci | ||
| - uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| prompt: "/grade-pr ${{ github.event.pull_request.number }}" | ||
| env: | ||
| SLACK_GRADING_WEBHOOK_URL: ${{ secrets.SLACK_GRADING_WEBHOOK_URL }} | ||