Skip to content

fix(fetch-secrets): swap fetch secret action to use node instead of bash - #5

Merged
Hweinstock merged 6 commits into
aws:mainfrom
Hweinstock:fix/windows-fetch-secrets-node
Sep 23, 2026
Merged

Hweinstock merged 6 commits into
aws:mainfrom
Hweinstock:fix/windows-fetch-secrets-node

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Problem

The fetch secrets action does not work on windows runners because it relies on bash.

Solution

Swap to node scripts instead of inline bash scripts for the secret id to env var mapping logic + register mask logic.

Testing

ran the script against the account hosting the secrets myself:

$ output_file=$(mktemp) && env SHARED_NAMES=SLACK_OPEN_PRS_WEBHOOK_URL REPO_NAMES=AWS_ROLE_ARN CALLER_REPO=aws/agentcore-cli GITHUB_OUTPUT="$output_file" node /[repo-path]/.github/actions/fetch-secrets/build-secret-mappings.js && cat "$output_file"
Resolved secret mappings:
  SLACK_OPEN_PRS_WEBHOOK_URL,shared/SLACK_OPEN_PRS_WEBHOOK_URL
  AWS_ROLE_ARN,aws/agentcore-cli/AWS_ROLE_ARN
mappings<<SECRET_MAPPINGS_EOF
SLACK_OPEN_PRS_WEBHOOK_URL,shared/SLACK_OPEN_PRS_WEBHOOK_URL
AWS_ROLE_ARN,aws/agentcore-cli/AWS_ROLE_ARN
SECRET_MAPPINGS_EOF

Note: all consumers leverage pinned commits, so this will not break them.

Next Steps

Once this is merged, I can make a commit to the agentcore-cli repo to use the new version and enable windows on e2e tests.

@Hweinstock
Hweinstock marked this pull request as ready for review September 23, 2026 13:03
@Hweinstock
Hweinstock requested a review from a team September 23, 2026 13:03
@Hweinstock
Hweinstock merged commit 75989f6 into aws:main Sep 23, 2026
@Hweinstock
Hweinstock deleted the fix/windows-fetch-secrets-node branch September 23, 2026 18:15
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.

2 participants