Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalidate broken cache of v1.16.1 #190

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dist/save-cache/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/save-cache/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/setup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/setup/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/restore-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {IS_MAC, getLinuxInfo, getMacOSInfo} from './utils'

export const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'
export const STATE_CACHE_MATCHED_KEY = 'cache-matched-key'
const CACHE_VERSION = '1'
const CACHE_DEPENDENCY_PATH = 'requirements**.lock'
const workingDirInput = core.getInput('working-directory')
const workingDir = workingDirInput ? `/${workingDirInput}` : ''
Expand Down Expand Up @@ -56,8 +57,8 @@ async function computeKeys(
: ''
const osInfo = IS_MAC ? await getMacOSInfo() : await getLinuxInfo()
const prefix = cachePrefix ? `${cachePrefix}-` : ''
const primaryKey = `${prefix}setup-rye-${process.env['RUNNER_OS']}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}-${dependencyPathHash}`
const restoreKey = `${prefix}setup-rye-${process.env['RUNNER_OS']}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}`
const primaryKey = `${prefix}setup-rye-${CACHE_VERSION}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}-${dependencyPathHash}`
const restoreKey = `${prefix}setup-rye-${CACHE_VERSION}-${osInfo.osVersion}-${osInfo.osName}-rye-${version}${workingDirHash}`
return {primaryKey, restoreKey}
}

Expand Down
Loading