Skip to content

chore(deps-dev): bump the dev-dependencies group across 1 directory with 6 updates #5068

chore(deps-dev): bump the dev-dependencies group across 1 directory with 6 updates

chore(deps-dev): bump the dev-dependencies group across 1 directory with 6 updates #5068

Workflow file for this run

name: PR Automation

Check warning on line 1 in .github/workflows/pr-automation.yml

View workflow run for this annotation

GitHub Actions / PR Automation

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
branches: [v0.x, v1.x, box-integration, "feat/**"]
types: [opened, reopened, edited, synchronize, labeled]
workflow_dispatch:
inputs:
automation:
description: Automation to run
required: true
type: choice
options: [harness-review, security-review, pr-tarball]
pr_number:
description: Pull request number
required: true
type: string
jobs:
size-title:
if: |
github.event_name == 'pull_request_target' &&
contains(fromJSON('["opened","reopened","edited","synchronize"]'), github.event.action)
permissions:
contents: read
pull-requests: write
statuses: write
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-pr-size-title.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: ubuntu
secrets: inherit
security-review:
if: |
(github.event_name == 'workflow_dispatch' && inputs.automation == 'security-review') ||
(
github.event_name == 'pull_request_target' &&
contains(fromJSON('["opened","reopened","synchronize","labeled"]'), github.event.action)
)
permissions:
id-token: write
pull-requests: write
issues: write
contents: read
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-pr-security-review.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: ubuntu
pr_number: ${{ inputs.pr_number || format('{0}', github.event.pull_request.number) }}
allowed_base_branches: '["v0.x","v1.x","box-integration"]'
secrets: inherit
harness-review:
if: |
(github.event_name == 'workflow_dispatch' && inputs.automation == 'harness-review') ||
(
github.event_name == 'pull_request_target' &&
contains(fromJSON('["opened","reopened"]'), github.event.action)
)
permissions:
id-token: write
pull-requests: write
issues: write
contents: read
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-pr-ai-review.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: ubuntu
model_id: us.anthropic.claude-opus-5
pr_url: >-
${{ github.event_name == 'workflow_dispatch' &&
format('{0}/{1}/pull/{2}', github.server_url, github.repository, inputs.pr_number) ||
github.event.pull_request.html_url }}
secret_source: secrets-manager
system_prompt_path: .github/harness/prompts/system.md
review_prompt_path: .github/harness/prompts/review.md
secrets: inherit
tarball-authorize:
if: |
(github.event_name == 'workflow_dispatch' && inputs.automation == 'pr-tarball') ||
(
github.event_name == 'pull_request_target' &&
contains(fromJSON('["opened","reopened","synchronize"]'), github.event.action)
)
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
is_authorized: ${{ steps.check.outputs.is_authorized }}
pr_number: ${{ steps.pr.outputs.number }}
head_sha: ${{ steps.pr.outputs.head_sha }}
steps:
- name: Resolve PR
id: pr
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ inputs.pr_number || github.event.pull_request.number }}
run: |
if [[ ! "$PR_NUMBER" =~ ^[0-9]+$ ]]; then
echo "::error::Invalid PR number: $PR_NUMBER"
exit 1
fi
pr="$(gh api "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}")"
author="$(jq -r '.user.login' <<< "$pr")"
base_ref="$(jq -r '.base.ref' <<< "$pr")"
head_sha="$(jq -r '.head.sha' <<< "$pr")"
state="$(jq -r '.state' <<< "$pr")"
if [[ "$state" != "open" ]]; then
echo "::error::PR #${PR_NUMBER} is not open"
exit 1
fi
case "$base_ref" in
v0.x|v1.x|box-integration|feat/*) ;;
*)
echo "::error::Unsupported base branch: $base_ref"
exit 1
;;
esac
echo "number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "author=$author" >> "$GITHUB_OUTPUT"
echo "head_sha=$head_sha" >> "$GITHUB_OUTPUT"
- name: Fetch secrets from Secrets Manager
uses: aws/agentcore-devx-devtools/.github/actions/fetch-secrets@e68d09b0c33dfb7a798448d50e6b48beedf00a3b
with:
role-arn: ${{ secrets.WORKFLOW_SECRETS_READER_ROLE_ARN }}
repo: AUTHORIZED_USERS
- name: Check authorization
id: authz
uses: aws/agentcore-devx-devtools/.github/actions/check-authorized-user@e68d09b0c33dfb7a798448d50e6b48beedf00a3b
with:
subject: ${{ steps.pr.outputs.author }}
authorized-users: ${{ env.AUTHORIZED_USERS }}
- name: Determine authorization
id: check
env:
IS_AUTHORIZED: ${{ steps.authz.outputs.is-authorized }}
PR_AUTHOR: ${{ steps.pr.outputs.author }}
run: |
if [[ "$IS_AUTHORIZED" == "true" ]]; then
echo "PR author ${PR_AUTHOR} is authorized"
echo "is_authorized=true" >> "$GITHUB_OUTPUT"
else
echo "PR author ${PR_AUTHOR} is not in AUTHORIZED_USERS, skipping"
echo "is_authorized=false" >> "$GITHUB_OUTPUT"
fi
pr-tarball:
needs: tarball-authorize
if: needs.tarball-authorize.outputs.is_authorized == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.tarball-authorize.outputs.head_sha }}
persist-credentials: false
allow-unsafe-pr-checkout: true
- name: Detect package manager
id: package-manager
run: |
if [[ -f bun.lock ]]; then
echo "name=bun" >> "$GITHUB_OUTPUT"
elif [[ -f npm-shrinkwrap.json || -f package-lock.json ]]; then
echo "name=npm" >> "$GITHUB_OUTPUT"
else
echo "::error::PR has no supported package lockfile"
exit 1
fi
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
if: steps.package-manager.outputs.name == 'bun'
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
if: steps.package-manager.outputs.name == 'npm'
with:
node-version: "20.x"
cache: npm
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
if: steps.package-manager.outputs.name == 'npm'
- name: Configure git
if: steps.package-manager.outputs.name == 'npm'
run: |
git config --global user.email "bedrock-agentcore-npm+ci@amazon.com"
git config --global user.name "CI"
- run: bun install --frozen-lockfile
if: steps.package-manager.outputs.name == 'bun'
- run: bun run build
if: steps.package-manager.outputs.name == 'bun'
- run: npm ci
if: steps.package-manager.outputs.name == 'npm'
- run: npm run build --if-present
if: steps.package-manager.outputs.name == 'npm'
- name: Pack CLI
id: tarball
run: |
if [[ "${{ steps.package-manager.outputs.name }}" == "bun" ]]; then
bun pm pack --destination "$RUNNER_TEMP"
else
npm pack --pack-destination "$RUNNER_TEMP"
fi
tarball="$(find "$RUNNER_TEMP" -maxdepth 1 -type f -name 'aws-agentcore-*.tgz' -print -quit)"
test -f "$tarball"
echo "name=$(basename "$tarball")" >> "$GITHUB_OUTPUT"
echo "path=$tarball" >> "$GITHUB_OUTPUT"
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create or update PR release
id: release
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
PR_NUMBER: ${{ needs.tarball-authorize.outputs.pr_number }}
TARBALL_NAME: ${{ steps.tarball.outputs.name }}
TARBALL_PATH: ${{ steps.tarball.outputs.path }}
HEAD_SHA: ${{ needs.tarball-authorize.outputs.head_sha }}
REPOSITORY: ${{ github.repository }}
run: |
tag="pr-${PR_NUMBER}-tarball"
gh release delete "$tag" --yes --cleanup-tag 2>/dev/null || true
gh release create "$tag" \
"$TARBALL_PATH" \
--title "PR #${PR_NUMBER} Tarball" \
--notes "Auto-generated tarball for PR #${PR_NUMBER}." \
--draft \
--target "$HEAD_SHA"
download_url="https://github.com/${REPOSITORY}/releases/download/${tag}/${TARBALL_NAME}"
echo "url=$download_url" >> "$GITHUB_OUTPUT"
- name: Comment on PR
uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5
with:
header: tarball
message: |
## Package Tarball
**[${{ steps.tarball.outputs.name }}](${{ steps.release.outputs.url }})**
### How to install
```bash
gh release download pr-${{ needs.tarball-authorize.outputs.pr_number }}-tarball --repo ${{ github.repository }} --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/${{ steps.tarball.outputs.name }}
```