From 30a63e7ff7c7451b227ca5bcf661ca391a3e7858 Mon Sep 17 00:00:00 2001 From: Dan Molik Date: Thu, 13 Oct 2022 09:30:09 -0400 Subject: [PATCH] fork and add irsa --- README.md | 6 +++--- action.yml | 4 ++-- package.json | 6 +++--- src/utils/actionUtils.ts | 8 +++++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a887a05..fc7cd70 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# whywaita/actions-cache-s3 +# dmolik/actions-s3-caching -`whywaita/actions-cache-s3` is a forked Action from [@actions/cache](https://github.com/actions/cache). +`dmolik/actions-s3-caching` is a forked Action from [@actions/cache](https://github.com/actions/cache). This Action provides Amazon Web Services S3 backend (and compatible software) for @actions/cache. @@ -8,7 +8,7 @@ This Action provides Amazon Web Services S3 backend (and compatible software) fo ```yaml - name: Cache multiple paths - uses: whywaita/actions-cache-s3@v2 + uses: dmolik/actions-s3-caching@v1 with: path: | ~/cache diff --git a/action.yml b/action.yml index 770709d..8e7c2ee 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,6 @@ -name: 'Cache S3' +name: 'S3 Caching' description: 'actions/cache@v2 for AWS S3 and compatible software (forked Actions)' -author: 'whywaita' +author: 'dmolik' inputs: path: description: 'A list of files, directories, and wildcard patterns to cache and restore' diff --git a/package.json b/package.json index 627173e..41a0485 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "cache", - "version": "2.1.7", + "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/actions/cache.git" + "url": "git+https://github.com/dmolik/actions-cache-s3.git" }, "keywords": [ "actions", diff --git a/src/utils/actionUtils.ts b/src/utils/actionUtils.ts index 4a1a659..cbd77c7 100644 --- a/src/utils/actionUtils.ts +++ b/src/utils/actionUtils.ts @@ -82,12 +82,14 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined { if (!s3BucketName) { return undefined } - - const s3config = { + const credentials = core.getInput(Inputs.AWSAccessKeyId) ? { credentials: { accessKeyId: core.getInput(Inputs.AWSAccessKeyId), secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) - }, + } + } : null + const s3config = { + ...credentials, region: core.getInput(Inputs.AWSRegion), endpoint: core.getInput(Inputs.AWSEndpoint), bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint),