Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Windows cache restored to wrong path on Linux #1059

@icemachined

Description

@icemachined

I want to store artifact on windows cache and then restore it on linux
It is restored but path is not the one i set in path option

steps:

  1. I store it on windows using recommended way of substituting archiver
      - name: Use GNU tar
        if: ${{ runner.os == 'Windows' }}
        shell: cmd
        run: |
          echo "Adding GNU tar to PATH"
          echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
      - name: Cache jep-distro
        uses: actions/cache@v3
        with:
          path: ~/.jep-distro-${{ runner.os }}
          key: ${{ runner.os }}-jep-distro
          restore-keys: |
            ${{ runner.os }}-jep-distro
  1. and then restore it on linux
    • name: Cache jep-distro
      uses: actions/cache@v3
      with:
      path: ~/.jep-distro-Windows
      key: Windows-jep-distro
      restore-keys: |
      Windows-jep-distro
      but seems like it restored with full windows path
/usr/bin/tar --use-compress-program unzstd -tf /home/runner/work/_temp/b0ccef32-351b-4867-aab1-b88256a01a66/cache.tzst -P
C:/Users/runneradmin/jep-distro-Windows/
C:/Users/runneradmin/jep-distro-Windows/jep/
C:/Users/runneradmin/jep-distro-Windows/jep/jep.dll
Cache Size: ~0 MB (58208 B)
/usr/bin/tar --use-compress-program unzstd -xf /home/runner/work/_temp/b0ccef32-351b-4867-aab1-b88256a01a66/cache.tzst -P -C /home/runner/work/jep-distro/jep-distro
Cache restored successfully
Cache restored from key: Windows-jep-distro

folder ~/.jep-distro-Windows is not created, and even then created manually it is removed after cache initialization.
but i can find it's content in /home/runner/work/jep-distro/jep-distro/C:/Users/runneradmin/jep-distro-Windows/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions