1 Commits

Author SHA1 Message Date
dependabot[bot]
30239f21d9 Bump @actions/core from 1.6.0 to 1.9.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 15:11:29 +00:00
5 changed files with 8293 additions and 14435 deletions

9888
dist/restore/index.js vendored

File diff suppressed because it is too large Load Diff

9888
dist/save/index.js vendored

File diff suppressed because it is too large Load Diff

2930
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "actions-s3-caching",
"version": "1.0.5",
"name": "cache-s3",
"version": "1.0.0",
"private": true,
"description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js",
@@ -13,7 +13,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/dmolik/actions-s3-caching.git"
"url": "git+https://github.com/dmolik/actions-cache-s3.git"
},
"keywords": [
"actions",
@@ -24,13 +24,12 @@
"license": "MIT",
"dependencies": {
"@actions/cache": "https://gitpkg.now.sh/whywaita/toolkit/packages/cache?0dcc12b18a1f353a46b14188aa30a2c28c57ae74",
"@actions/core": "^1.2.6",
"@actions/core": "^1.9.1",
"@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/client-sts": "^3.50.0",
"@aws-sdk/credential-provider-web-identity": "^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 { fromTokenFile } from "@aws-sdk/credential-provider-web-identity";
import { getDefaultRoleAssumerWithWebIdentity } from "@aws-sdk/client-sts";
import { fromTokenFile } from "@aws-sdk/credential-providers";
export function isGhes(): boolean {
const ghUrl = new URL(
@@ -82,18 +81,16 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined {
if (!s3BucketName) {
return undefined
}
const credentials = core.getInput(Inputs.AWSAccessKeyId) ? {
credentials: {
accessKeyId: core.getInput(Inputs.AWSAccessKeyId),
secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey)
}
} : {
credentials: fromTokenFile({
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(),
})
credentials: {
fromTokenFile({})
}
}
const s3config = {
...credentials,
region: core.getInput(Inputs.AWSRegion),