Created
January 16, 2024 17:04
-
-
Save kgriffs/50b7c490e0f28443481b9d1ec528c657 to your computer and use it in GitHub Desktop.
Github Action (GHA) caching a downloaded file example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Cache downloaded file | |
id: cache-some-file | |
uses: actions/cache@v3 | |
with: | |
path: some-file | |
key: ${{ runner.os }}-downloaded-file-${{ hashFiles('some-file') }} | |
- name: Fetch smctl MSI | |
if: steps.cache-some-file.outputs.cache-hit != 'true' | |
shell: pwsh | |
run: | | |
Invoke-WebRequest -Uri https://example.com/some-file -OutFile some-file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment