forked from aws/agentcore-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (77 loc) · 2.34 KB
/
Copy pathagent-restricted.yml
File metadata and controls
83 lines (77 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Restricted Agent
# RESTRICTED ACCESS VERSION
# Only specific users can trigger this workflow manually
on:
workflow_dispatch:
inputs:
prompt:
description: 'Prompt for the agent'
required: true
default: 'What are my active pull requests?'
type: string
system_prompt:
description: 'System prompt'
required: false
type: string
provider:
description: 'Provider'
default: 'bedrock'
required: false
type: choice
options:
- bedrock
- github
- openai
- anthropic
model:
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'
type: string
max_tokens:
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)'
required: false
default: 'strands_tools:shell;tools:use_github'
type: string
agent_runner:
description: 'Custom agent runner URL'
required: false
type: string
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
jobs:
agent:
runs-on: ubuntu-latest
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@v6
- 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: ${{ secrets.PAT_TOKEN }}
env:
STRANDS_TOOLS_DIRECTORY: 'true'