Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Platane committed Jan 10, 2024
1 parent edc7f48 commit 38d0dbe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: ./
with:
path: |
a/b/c/file.txt
a/b
file.txt
key: cache-${{ github.run_id }}-${{ github.sha }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: ./
with:
path: |
a/b/c/file.txt
a/b
file.txt
key: cache-${{ github.run_id }}-${{ github.sha }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: ./
with:
path: |
a/b/c/file.txt
a/b
key: cache-${{ github.run_id }}-${{ github.sha }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }}
Expand All @@ -76,7 +76,7 @@ jobs:
- uses: ./
with:
path: |
a/b/c/file.txt
a/b
key: cache-${{ github.run_id }}-${{ github.sha }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }}
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ steps:
path: |
path/to/file/a
another/file
a/directory
key: cache-${{ hashFiles('**/**.rs') }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }}
Expand All @@ -23,3 +24,9 @@ steps:
Handle cache expiration ourselves.
No restriction based on branches, [github-restrictions-for-accessing-a-cache](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache)
# Implementation
- zip every file (or directory recursively) in path
- make a zip of all of them
- upload the resulting zip with cache key as name

0 comments on commit 38d0dbe

Please sign in to comment.