Skip to content

Commit

Permalink
Use a hash of the image url in the bazel cache key (#40)
Browse files Browse the repository at this point in the history
* Use a hash of the image url in the bazel cache key

* Add missing shell argument
  • Loading branch information
mkruskal-google authored Jun 7, 2024
1 parent dc5ce2c commit 44eea01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bazel-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,17 @@ runs:
- name: Setup Runner
uses: ./../../_actions/current/internal/setup-runner

- name: Calculate Image Hash
id: image-hash
shell: bash
run: echo ::set-output name=value::$(echo ${{ inputs.image }} | md5sum | cut -f1 -d" ")

- name: Setup Bazel
id: bazel
uses: ./../../_actions/current/internal/bazel-setup
with:
credentials-file: /workspace/$(basename ${{ steps.auth.outputs.credentials-file }})
bazel-cache: ${{ inputs.bazel-cache }}
bazel-cache: ${{ inputs.bazel-cache }}-${{ steps.image-hash.outputs.value }}

- name: Hook up repository Cache
shell: bash
Expand Down

0 comments on commit 44eea01

Please sign in to comment.