Skip to content

Commit

Permalink
feat: add example for gcs
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed Jun 7, 2024
1 parent 8433bd9 commit 65f1113
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Fork from: https://github.com/tespkg/actions-cache

## Usage

### AWS S3

```yaml
name: dev ci

Expand Down Expand Up @@ -77,6 +79,40 @@ jobs:
${{ runner.os }}/yarn/
```
### Google Cloud Storage
```yaml
name: dev ci

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
id-token: write
contents: read

jobs:
build_test:
runs-on: [ubuntu-latest]

steps:
- uses: everpcpc/actions-cache@v2
with:
provider: gcs
bucket: "example-ci-bucket"
root: "cloud/cache"
path: |
~/.cache/go-build
~/go/pkg/mod
key: |
test/${{ runner.os }}/go/${{ hashFiles('**/go.sum') }}
restore-keys: |
test/${{ runner.os }}/go/
```
## Restore keys
`restore-keys` works similar to how github's `@actions/cache@v2` works: It search each item in `restore-keys`
Expand Down

0 comments on commit 65f1113

Please sign in to comment.