Skip to content

Linux -> Mac & enableCrossOsArchive -> Cache not found for input keys #1110

@niall-byrne

Description

@niall-byrne

When creating a simple cache of downloaded content in my Linux steps, and caching it, each Linux machine has no problem mounting the created cache and reusing the content.

When the workflow gets to the OSX machine, it does not register a cache hit, and instead creates a new cache instance with the identical key.

Config:

Linux Machines (happy to use the cache):

   - name: Ansible Lint -- Mount Ansible Cache
      uses: actions/cache@v3
      with:
        enableCrossOsArchive: true
        key: ansible-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
        path: ansible_cache

OSX Machine (creates it's own cache):

    - name: Apply Profile -- Mount Ansible Cache
       uses: actions/cache@v3
       with:
         enableCrossOsArchive: true
         key: "ansible-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}"
          path: ansible_cache

Am I assuming functionality that does not exist?

Example Workflow Run: https://github.com/osx-provisioner/profile-generator/actions/runs/4197900167/jobs/7280858264

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions