mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-02 05:55:10 +09:00
chore: build and set cleanup file
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as core from '@actions/core';
|
||||
import { STSClient } from '@aws-sdk/client-sts';
|
||||
import { NodeHttpHandler } from '@aws-sdk/node-http-handler';
|
||||
import proxy from 'https-proxy-agent';
|
||||
@@ -18,8 +19,11 @@ export class CredentialsClient {
|
||||
constructor(props: CredentialsClientProps) {
|
||||
if (props.region) {
|
||||
this.region = props.region;
|
||||
} else {
|
||||
core.info('No region provided, using global STS endpoint');
|
||||
}
|
||||
if (props.proxyServer) {
|
||||
core.info('Configurint proxy handler for STS client');
|
||||
const handler = proxy(props.proxyServer);
|
||||
this.requestHandler = new NodeHttpHandler({
|
||||
httpAgent: handler,
|
||||
|
||||
@@ -58,7 +58,6 @@ export async function run() {
|
||||
|
||||
// Validate and export region
|
||||
if (region) {
|
||||
core.info('Using global STS endpoint');
|
||||
if (!region.match(REGION_REGEX)) {
|
||||
throw new Error(`Region is not valid: ${region}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user