Skip to content

ci: ANTHROPIC_API_KEY 未設定時はジョブをスキップ #1

ci: ANTHROPIC_API_KEY 未設定時はジョブをスキップ

ci: ANTHROPIC_API_KEY 未設定時はジョブをスキップ #1

Workflow file for this run

name: 採点くん

Check failure on line 1 in .github/workflows/grade-pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/grade-pr.yml

Invalid workflow file

(Line: 13, Col: 9): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.ANTHROPIC_API_KEY != ''
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 }}