-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): claude.yml テンプレートに認証ガードを追加し未設定時のCI失敗を防止 #1045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,9 +79,26 @@ jobs: | |
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Check Claude authentication | ||
| id: claude-auth | ||
| env: | ||
| CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| ANTHROPIC_FEDERATION_RULE_ID: ${{ secrets.ANTHROPIC_FEDERATION_RULE_ID }} | ||
| ANTHROPIC_ORGANIZATION_ID: ${{ secrets.ANTHROPIC_ORGANIZATION_ID }} | ||
| run: | | ||
| if [ -n "$CLAUDE_CODE_OAUTH_TOKEN" ] || | ||
| [ -n "$ANTHROPIC_API_KEY" ] || | ||
| { [ -n "$ANTHROPIC_FEDERATION_RULE_ID" ] && [ -n "$ANTHROPIC_ORGANIZATION_ID" ]; }; then | ||
|
Comment on lines
+91
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a downstream repository has only Useful? React with 👍 / 👎.
coderabbitai[bot] marked this conversation as resolved.
|
||
| echo "available=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "available=false" >> "$GITHUB_OUTPUT" | ||
| echo "::notice::Skipping Claude Code because no Claude authentication secret is configured." | ||
| fi | ||
|
|
||
| - name: Run Claude Code | ||
| id: claude | ||
| if: steps.pr_draft.outputs.is_draft != 'true' | ||
| if: steps.pr_draft.outputs.is_draft != 'true' && steps.claude-auth.outputs.available == 'true' | ||
| uses: anthropics/claude-code-action@a92e7c70a4da9793dc164451d829089dc057a464 # v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes only the runnable workflow while
templates/workflows/claude.ymlremains unchanged. The checkedscript/check-workflow-template-sync.jstreats that template as the source paired with this file, andnpm run workflow:sync:checknow fails; moreover, downstream synchronization will continue distributing the unguarded template, so the intended organization-wide fix will not propagate.Useful? React with 👍 / 👎.