Skip to content

Shared Key not being respected #239

@abdulrabbani00

Description

@abdulrabbani00

Right now I have this config run whenever we have a merge to main:

- name: Update Rust cache
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: "v0"
          shared-key: "main"
          save-if: "true"
          cache-on-failure: true

When in my PR branches (base branches) I have the following:

      - name: Setup Rust caching
        if: steps.check_rust_changes.outputs.has_rust_changes == 'true'
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: "v0"
          shared-key: "main"
          save-if: "false"

For some reason my base branches search for: Warning: Cache not found for keys: v0-main-Linux-x64-5f2382c3-c8b779c5, v0-main-Linux-x64-5f2382c3

So I can find the cache on my main branch but not on subsequent PR branches (base branches). I would expect this functionality to search for the cache v0-main.

Can someone help me understand this if I am misunderstanding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions