2 Commits

Author SHA1 Message Date
Dan Molik
e5aa7db291 fix irsa support 2022-10-13 11:10:39 -04:00
Dan Molik
55608bd7c6 fully support IRSA 2022-10-13 10:56:51 -04:00
3 changed files with 17076 additions and 58 deletions

17120
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,8 @@
"@actions/exec": "^1.0.1",
"@actions/io": "^1.1.0",
"@aws-sdk/client-s3": "^3.51.0",
"@aws-sdk/types": "^3.50.0"
"@aws-sdk/types": "^3.50.0",
"@aws-sdk/credential-providers": "^3.50.0"
},
"devDependencies": {
"@types/jest": "^27.4.0",

View File

@@ -1,8 +1,7 @@
import * as core from "@actions/core";
import { Inputs, Outputs, RefKey, State } from "../constants";
import {CommonPrefix, InputSerialization, S3ClientConfig} from "@aws-sdk/client-s3";
import { CommonPrefix, InputSerialization, S3ClientConfig } from "@aws-sdk/client-s3";
import { fromTokenFile } from "@aws-sdk/credential-providers";
export function isGhes(): boolean {
const ghUrl = new URL(
@@ -87,7 +86,11 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined {
accessKeyId: core.getInput(Inputs.AWSAccessKeyId),
secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey)
}
} : null
} : {
credentials: {
fromTokenFile({})
}
}
const s3config = {
...credentials,
region: core.getInput(Inputs.AWSRegion),