diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2d48ba..eb539e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/README.md b/README.md index 06f547e..3267ad7 100644 --- a/README.md +++ b/README.md @@ -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 }} @@ -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