Skip to content

Commit

Permalink
Merge pull request #44 from codecov/configure_cache_file
Browse files Browse the repository at this point in the history
Make the cache file configurable
  • Loading branch information
michelletran-codecov authored Feb 25, 2025
2 parents 225cf78 + 1787b7a commit 78a89fb
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ on:
working_directory:
type: string
default: .
cache_file:
type: string
default: "requirements.txt"

env:
AR_REPO: ${{ inputs.repo }}
@@ -52,7 +55,7 @@ jobs:
with:
path: |
${{ inputs.working_directory }}/requirements.tar
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('{0}/**/requirements.txt', inputs.working_directory)) }}-${{ hashFiles(format('{0}/**/docker/Dockerfile.requirements', inputs.working_directory)) }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('{0}/**/{1}', inputs.working_directory, inputs.cache_file)) }}-${{ hashFiles(format('{0}/**/docker/Dockerfile.requirements', inputs.working_directory)) }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
5 changes: 4 additions & 1 deletion .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,9 @@ on:
cache_requirements:
type: boolean
default: true
cache_file:
type: string
default: "requirements.txt"
working_directory:
type: string
default: .
@@ -59,7 +62,7 @@ jobs:
with:
path: |
${{ inputs.working_directory }}/requirements.tar
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('{0}/**/requirements.txt', inputs.working_directory)) }}-${{ hashFiles(format('{0}/**/docker/Dockerfile.requirements', inputs.working_directory)) }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('{0}/**/{1}', inputs.working_directory, inputs.cache_file)) }}-${{ hashFiles(format('{0}/**/docker/Dockerfile.requirements', inputs.working_directory)) }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-

0 comments on commit 78a89fb

Please sign in to comment.