Skip to content

Repository files navigation

actions-s3-cache

This action allows caching dependencies to s3 compatible storage, e.g. minio

It also has github's actions/cache@v2 fallback if s3 save & restore fails

Usage

name: dev cion:
push:
branches: [main]pull_request:
branches: [main]jobs:
build_test:
runs-on: [ubuntu-latest]steps:
- uses: actions/checkout@v2
- uses: tespkg/actions-cache@v1with:
endpoint: play.min.io # optional, default s3.amazonaws.cominsecure: false # optional, use http instead of https. default falseaccessKey: "Q3AM3UQ867SPQQA43P2F"# requiredsecretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"# requiredbucket: actions-cache # requireduse-fallback: true # optional, use github actions cache fallback, default true# actions/cache compatible properties: https://github.com/actions/cachekey: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}path: | node_modules .cacherestore-keys: | ${{ runner.os }}-yarn-

Restore keys

restore-keys works similar to how github's @actions/cache@v2 works: It search each item in restore-keys as prefix in object names and use the latest one

Amazon S3 permissions

When using this with Amazon S3, the following permissions are necessary:

  • s3:PutObject
  • s3:GetObject
  • s3:ListBucket
  • s3:GetBucketLocation
  • s3:ListBucketMultipartUploads
  • s3:ListMultipartUploadParts

About

An actions cache to S3 with github actions pass through

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages