Skip to content

Instantly share code, notes, and snippets.

@aidapsibr
Created January 20, 2020 10:47
Show Gist options
  • Save aidapsibr/ed4d6e0ff04f17e204957793f03f1c95 to your computer and use it in GitHub Desktop.
Save aidapsibr/ed4d6e0ff04f17e204957793f03f1c95 to your computer and use it in GitHub Desktop.
Example using actions/cache to create a cache for all nuget packages based on project files (assumes PackageReference is used)
- uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} #hash of project files
restore-keys: |
${{ runner.os }}-nuget-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment