Skip to content

Commit

Permalink
Dont reuse the full deployment deps cache in PRs
Browse files Browse the repository at this point in the history
This means the first PR action will rebuild the deps, however all subsequent PRs will be able to reuse the deps. 

If a PR changes deps then it will also get cached. Previous changing deps in a PR would rebuild the deps on each deploy.
  • Loading branch information
shalabhc authored Sep 4, 2024
1 parent 8dfef76 commit 59e5966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actions/build_deploy_python_executable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ runs:
# Don't use cached deps if instructed
if: ${{ inputs.force_rebuild_deps != 'true' }}
# For PR commits, use the target branch name as the cache-tag, for other commits, use the branch name itself
run: echo "FLAG_DEPS_CACHE_FROM=--deps-cache-from=${{ github.repository }}/${{ github.base_ref && github.base_ref || github.ref_name }}" >> $GITHUB_ENV
run: echo "FLAG_DEPS_CACHE_FROM=--deps-cache-from=${{ github.repository }}/${{ github.ref_name }}" >> $GITHUB_ENV
shell: bash

- name: Set deps-cache-to
Expand Down

0 comments on commit 59e5966

Please sign in to comment.