Skip to content

Commit

Permalink
use env
Browse files Browse the repository at this point in the history
  • Loading branch information
jackieli-tes committed Jan 30, 2024
1 parent a54fd90 commit 68b4f4e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jobs:
uses: actions/checkout@v4
- name: Restore cache
uses: ./
env:
AWS_ACCESS_KEY_ID: "Q3AM3UQ867SPQQA43P2F"
AWS_SECRET_ACCESS_KEY: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
# AWS_SESSION_TOKEN: "xxx"
AWS_REGION: "us-east-1"
with:
endpoint: play.min.io
bucket: actions-cache
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ jobs:
${{ runner.os }}-yarn-
```
You can also set env instead of using `with`:

```yaml
- uses: tespkg/actions-cache@v1
env:
AWS_ACCESS_KEY_ID: "Q3AM3UQ867SPQQA43P2F"
AWS_SECRET_ACCESS_KEY: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
# AWS_SESSION_TOKEN: "xxx"
AWS_REGION: "us-east-1"
with:
endpoint: play.min.io
bucket: actions-cache
use-fallback: false
key: test-${{ runner.os }}-${{ github.run_id }}
path: |
test-cache
~/test-cache
```

## 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 68b4f4e

Please sign in to comment.