-
Notifications
You must be signed in to change notification settings - Fork 68
ci: migrate workflows to shared reusable workflows #1829
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
d82b6c6
250e3be
d7689f1
7aafe61
4bd4517
17eb11e
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 |
|---|---|---|
|
|
@@ -2,22 +2,21 @@ name: Restricted Agent | |
|
|
||
| # RESTRICTED ACCESS VERSION | ||
| # Only specific users can trigger this workflow manually | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| prompt: | ||
| description: 'Prompt for the agent' | ||
|
Contributor
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. why have we removed these
Contributor
Author
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. I think the |
||
| description: Prompt for the agent | ||
| required: true | ||
| default: 'What are my active pull requests?' | ||
| default: What are my active pull requests? | ||
| type: string | ||
| system_prompt: | ||
| description: 'System prompt' | ||
| description: System prompt | ||
| required: false | ||
| type: string | ||
| provider: | ||
| description: 'Provider' | ||
| default: 'bedrock' | ||
| description: Provider | ||
| default: bedrock | ||
| required: false | ||
| type: choice | ||
| options: | ||
|
|
@@ -26,22 +25,22 @@ on: | |
| - openai | ||
| - anthropic | ||
| model: | ||
| description: 'Model ID (e.g., us.anthropic.claude-sonnet-4-5-20250929-v1:0)' | ||
| description: Model ID (e.g., us.anthropic.claude-sonnet-4-5-20250929-v1:0) | ||
| required: false | ||
| default: 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | ||
| default: us.anthropic.claude-sonnet-4-5-20250929-v1:0 | ||
| type: string | ||
| max_tokens: | ||
| description: 'Maximum tokens for model response' | ||
| description: Maximum tokens for model response | ||
| required: false | ||
| default: '10000' | ||
| type: string | ||
| tools: | ||
| description: 'Tool config (e.g., strands_tools:shell;strands_action:use_github)' | ||
| description: Tool config (e.g., strands_tools:shell;strands_action:use_github) | ||
| required: false | ||
| default: 'strands_tools:shell;tools:use_github' | ||
| default: strands_tools:shell;tools:use_github | ||
| type: string | ||
| agent_runner: | ||
| description: 'Custom agent runner URL' | ||
| description: Custom agent runner URL | ||
| required: false | ||
| type: string | ||
|
|
||
|
|
@@ -52,39 +51,15 @@ permissions: | |
| issues: write | ||
|
|
||
| jobs: | ||
| agent: | ||
| runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }} | ||
| steps: | ||
| - name: Check authorization | ||
| run: | | ||
| AUTHORIZED_USERS="${{ secrets.AUTHORIZED_USERS }}" | ||
| if [[ ",$AUTHORIZED_USERS," != *",${{ github.actor }},"* ]]; then | ||
| echo "❌ User ${{ github.actor }} is NOT authorized" | ||
| exit 1 | ||
| fi | ||
| echo "✅ User ${{ github.actor }} is authorized" | ||
|
|
||
| - uses: actions/checkout@v7 | ||
|
|
||
| - name: Generate GitHub App Token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v3 | ||
| with: | ||
| app-id: ${{ vars.APP_ID }} | ||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
|
||
| - name: Run Strands Agent | ||
| uses: ./.github/actions/strands-action | ||
| with: | ||
| prompt: ${{ inputs.prompt }} | ||
| provider: ${{ inputs.provider }} | ||
| model: ${{ inputs.model }} | ||
| max_tokens: ${{ inputs.max_tokens }} | ||
| system_prompt: ${{ inputs.system_prompt }} | ||
| tools: ${{ inputs.tools }} | ||
| agent_runner: ${{ inputs.agent_runner }} | ||
| aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} | ||
| aws_region: 'us-west-2' | ||
| pat_token: ${{ steps.app-token.outputs.token }} | ||
| env: | ||
| STRANDS_TOOLS_DIRECTORY: 'true' | ||
| call: | ||
| uses: aws/agentcore-devx-devtools/.github/workflows/reusable-agent-restricted.yml@458c0a684af0f9e3a013ec05cd23851def4f9cab | ||
| with: | ||
| runner: codebuild | ||
| prompt: ${{ inputs.prompt || 'What are my active pull requests?' }} | ||
| system_prompt: ${{ inputs.system_prompt || '' }} | ||
| provider: ${{ inputs.provider || 'bedrock' }} | ||
| model: ${{ inputs.model || 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' }} | ||
| max_tokens: ${{ inputs.max_tokens || '10000' }} | ||
| tools: ${{ inputs.tools || 'strands_tools:shell;tools:use_github' }} | ||
| agent_runner: ${{ inputs.agent_runner || '' }} | ||
| secrets: inherit | ||
This file was deleted.
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.
can we add this comment back?