Skip to content

ci(claude): allow dotnet build/test in Claude's GitHub Actions job - #249

Merged
DeepDiver1975 merged 1 commit into
mainfrom
ci/claude-github-action
Sep 6, 2026
Merged

DeepDiver1975 merged 1 commit into
mainfrom
ci/claude-github-action

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Summary

Root cause of the two blocked checkboxes in #246's Claude run ("Build & run tests" and "Screenshots"): claude.yml never installs the .NET SDK on the runner and never grants Claude's Bash tool permission to run dotnet. Any Bash command not on the allow-list requires interactive approval, and there's no one to approve it in an unattended CI job — so dotnet build/dotnet test (and even dotnet --version) were permanently blocked rather than merely slow.

  • Add a Setup .NET step (same actions/setup-dotnet pin + 10.0.x version already used in ci.yml/release.yml)
  • Add claude_args: --allowedTools "Bash(dotnet restore:*),Bash(dotnet build:*),Bash(dotnet test:*)" so Claude can restore/build/test without a human approval gate

Test plan

  • python3 -c "import yaml; yaml.safe_load(...)" — workflow YAML parses
  • Trigger @claude on an issue/PR and confirm it can now run dotnet build/dotnet test unattended

🤖 Generated with Claude Code

https://claude.ai/code/session_01P56zPzfPgPWbq6YajhAUUY

Without a .NET setup step and an --allowedTools grant, dotnet
restore/build/test require an interactive approval that has no one to
grant it in an unattended workflow run, so Claude's job could never
build or test the repo (see #246).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P56zPzfPgPWbq6YajhAUUY
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 force-pushed the ci/claude-github-action branch from b37dee6 to 8190595 Compare September 6, 2026 22:00
@DeepDiver1975
DeepDiver1975 merged commit 69d533e into main Sep 6, 2026
2 checks passed
@DeepDiver1975
DeepDiver1975 deleted the ci/claude-github-action branch September 6, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant