Skip to content

Commit

Permalink
Fix cache
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed May 18, 2023
1 parent 3ec899f commit a40f7cb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ jobs:
cache-name: cache-proxspace
with:
path: C:/ProxSpace
key: proxspace-${{ hashFiles('./proxspace.zip') }}-${{ github.run_id }}
restore-keys: |
proxspace-${{ hashFiles('./proxspace.zip') }}-
key: proxspace-${{ hashFiles('./proxspace.zip') }}

# don't use cache-hit
# in case of partial key match
- name: Check Cache
id: check-cache
continue-on-error: true
run: cd C:/ProxSpace

- name: ProxSpace extract
if: ${{ !contains(steps.check-cache.outcome, 'success') }}
run: Expand-Archive -LiteralPath "C:\proxspace.zip" -DestinationPath "C:\"

- name: ProxSpace delete zip
Expand All @@ -58,6 +64,7 @@ jobs:
Remove-Item "./proxspace.zip"
- name: ProxSpace rename folder
if: ${{ !contains(steps.check-cache.outcome, 'success') }}
run: Get-ChildItem -Path "C:\ProxSpace-*" | Rename-Item -NewName (Split-Path C:\ProxSpace -Leaf)

- name: ProxSpace version
Expand All @@ -66,6 +73,7 @@ jobs:
Write-Host "ProxSpace version: $psversion"
- name: ProxSpace initial startup
if: ${{ !contains(steps.check-cache.outcome, 'success') }}
working-directory: C:\ProxSpace
run: ./runme64.bat -c "exit"

Expand Down Expand Up @@ -103,9 +111,7 @@ jobs:
cache-name: cache-proxspace
with:
path: C:/ProxSpace
key: proxspace-${{ hashFiles('./proxspace.zip') }}-${{ github.run_id }}
restore-keys: |
proxspace-${{ hashFiles('./proxspace.zip') }}-
key: proxspace-${{ hashFiles('./proxspace.zip') }}

- name: ProxSpace delete zip
run: |
Expand Down

0 comments on commit a40f7cb

Please sign in to comment.