fork and add irsa

This commit is contained in:
Dan Molik
2022-10-13 09:30:09 -04:00
parent 3af6334fd9
commit 30a63e7ff7
4 changed files with 13 additions and 11 deletions

View File

@@ -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. 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 ```yaml
- name: Cache multiple paths - name: Cache multiple paths
uses: whywaita/actions-cache-s3@v2 uses: dmolik/actions-s3-caching@v1
with: with:
path: | path: |
~/cache ~/cache

View File

@@ -1,6 +1,6 @@
name: 'Cache S3' name: 'S3 Caching'
description: 'actions/cache@v2 for AWS S3 and compatible software (forked Actions)' description: 'actions/cache@v2 for AWS S3 and compatible software (forked Actions)'
author: 'whywaita' author: 'dmolik'
inputs: inputs:
path: path:
description: 'A list of files, directories, and wildcard patterns to cache and restore' description: 'A list of files, directories, and wildcard patterns to cache and restore'

View File

@@ -1,6 +1,6 @@
{ {
"name": "cache", "name": "cache-s3",
"version": "2.1.7", "version": "1.0.0",
"private": true, "private": true,
"description": "Cache dependencies and build outputs", "description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js", "main": "dist/restore/index.js",
@@ -13,7 +13,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/actions/cache.git" "url": "git+https://github.com/dmolik/actions-cache-s3.git"
}, },
"keywords": [ "keywords": [
"actions", "actions",

View File

@@ -82,12 +82,14 @@ export function getInputS3ClientConfig(): S3ClientConfig | undefined {
if (!s3BucketName) { if (!s3BucketName) {
return undefined return undefined
} }
const credentials = core.getInput(Inputs.AWSAccessKeyId) ? {
const s3config = {
credentials: { credentials: {
accessKeyId: core.getInput(Inputs.AWSAccessKeyId), accessKeyId: core.getInput(Inputs.AWSAccessKeyId),
secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey) secretAccessKey: core.getInput(Inputs.AWSSecretAccessKey)
}, }
} : null
const s3config = {
...credentials,
region: core.getInput(Inputs.AWSRegion), region: core.getInput(Inputs.AWSRegion),
endpoint: core.getInput(Inputs.AWSEndpoint), endpoint: core.getInput(Inputs.AWSEndpoint),
bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint), bucketEndpoint: core.getBooleanInput(Inputs.AWSS3BucketEndpoint),