mirror of
https://gitee.com/jack_whh/actions-s3-caching.git
synced 2026-03-09 22:42:55 +08:00
fix irsa support
This commit is contained in:
5309
package-lock.json
generated
5309
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@
|
|||||||
"@actions/io": "^1.1.0",
|
"@actions/io": "^1.1.0",
|
||||||
"@aws-sdk/client-s3": "^3.51.0",
|
"@aws-sdk/client-s3": "^3.51.0",
|
||||||
"@aws-sdk/types": "^3.50.0",
|
"@aws-sdk/types": "^3.50.0",
|
||||||
"@aws-sdk/credential-provider-web-identity": "^3.50.0"
|
"@aws-sdk/credential-providers": "^3.50.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.0",
|
"@types/jest": "^27.4.0",
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
|
|
||||||
import { Inputs, Outputs, RefKey, State } from "../constants";
|
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";
|
||||||
import { fromTokenFile } from "@aws-sdk/credential-provider-web-identity";
|
|
||||||
|
|
||||||
export function isGhes(): boolean {
|
export function isGhes(): boolean {
|
||||||
const ghUrl = new URL(
|
const ghUrl = new URL(
|
||||||
@@ -88,9 +86,11 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined {
|
|||||||
accessKeyId: core.getInput(Inputs.AWSAccessKeyId),
|
accessKeyId: core.getInput(Inputs.AWSAccessKeyId),
|
||||||
secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey)
|
secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey)
|
||||||
}
|
}
|
||||||
} : fromTokenFile({
|
} : {
|
||||||
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity()
|
credentials: {
|
||||||
})
|
fromTokenFile({})
|
||||||
|
}
|
||||||
|
}
|
||||||
const s3config = {
|
const s3config = {
|
||||||
...credentials,
|
...credentials,
|
||||||
region: core.getInput(Inputs.AWSRegion),
|
region: core.getInput(Inputs.AWSRegion),
|
||||||
|
|||||||
Reference in New Issue
Block a user