Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Restore does not find cache key even though it seems to exist #7

@jbergstroem

Description

@jbergstroem

Given the following yaml:

      - name: Check if cache key exists
        uses: martijnhols/actions-cache/[email protected]
        id: cache_exists
        with:
          path: .venv
          key: ${{ runner.os }}-python-deps-${{ hashFiles('poetry.lock') }}

      - name: Set up Python
        uses: actions/setup-python@v4
        if: steps.cache_exists.outputs.cache-hit != 'true'
        with:
          python-version: ${{ env.PYTHON_VERSION }}

      - name: Restore dependency cache
        uses: actions/cache@v3
        if: steps.cache_exists.outputs.cache-hit != 'true'
        id: deps-cache
        with:
          path: .venv
          key: ${{ runner.os }}-python-deps-${{ hashFiles('poetry.lock') }}

I get this output:
Screenshot 2023-06-29 at 7 47 57 PM

Comparing the keys, they look identical (copy pasted manually from output):

  • Linux-python-deps-905d6047b1ef7816097d7c2ed5d59e9334470b45f129b2df87b40a4f33058e2a
  • Linux-python-deps-905d6047b1ef7816097d7c2ed5d59e9334470b45f129b2df87b40a4f33058e2a

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