feat(examples): add workflow_dispatch example for on-demand Claude tasks#775
Open
ModeEric wants to merge 2 commits intoanthropics:mainfrom
Open
feat(examples): add workflow_dispatch example for on-demand Claude tasks#775ModeEric wants to merge 2 commits intoanthropics:mainfrom
ModeEric wants to merge 2 commits intoanthropics:mainfrom
Conversation
Adds a new example showing how to trigger Claude manually via GitHub UI or API without creating an issue. This addresses the use case described in anthropics#764 where users want to run Claude on-demand. Features: - Trigger via GitHub Actions UI with custom task input - Trigger via GitHub API for external integrations - Optional issue number input for additional context - Includes curl example for API usage
ashwin-ant
previously approved these changes
Dec 28, 2025
Comment on lines
+46
to
+54
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| prompt: | | ||
| Repository: ${{ github.repository }} | ||
| Branch: ${{ github.ref_name }} | ||
| ${{ github.event.inputs.issue_number && format('Related Issue: #{0}', github.event.inputs.issue_number) || '' }} | ||
|
|
||
| Task: ${{ github.event.inputs.task }} |
Collaborator
There was a problem hiding this comment.
This is cool, should we also include some allowed tools to make this work out of the box a bit better?
Author
There was a problem hiding this comment.
Yeah good idea! I ran into similar issues with testing, so I updated the PR to allow some basic file editing tools so it works out of the box.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new example showing how to trigger Claude manually via GitHub UI or API without creating an issue. This addresses the use case described in #764 where users want to run Claude on-demand.
Features: