mirror of
https://gitee.com/jack_whh/actions-s3-caching.git
synced 2026-03-09 22:42:55 +08:00
fork and add irsa
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user