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

fix: some minor repairs #183

Merged
merged 5 commits into from
Oct 3, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Setup Android SDK
uses: ./
with:
cache-key: 'default-version'
cache-key: custom-cache-key-on-${{matrix.os}}

- run: |
sdkmanager --install emulator
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ steps:
# Whether to use the cache
cache-disabled: true

# default: `${sdkVersion}-${buildToolsVersion}-${ndkVersion}-${cmakeVersion}-v3.1`
# default: `${sdkVersion}-${buildToolsVersion}-${ndkVersion}-${cmakeVersion}-v3.2`
# Custom key for cache. It is invalid when `cache-disabled: true`
cache-key: 'custom-cache-key'

Expand Down
6 changes: 3 additions & 3 deletions dist/cleanup/index.js

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

8 changes: 4 additions & 4 deletions dist/setup/index.js

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

6 changes: 3 additions & 3 deletions src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function generateRestoreKey(
cacheKey: string
): string {
if (cacheKey) return cacheKey
return `${sdkVersion}-${buildToolsVersion}-${ndkVersion}-${cmakeVersion}-v3.1`
return `${sdkVersion}-${buildToolsVersion}-${ndkVersion}-${cmakeVersion}-v3.2`
}

export async function restoreCache(
Expand All @@ -33,9 +33,9 @@ export async function restoreCache(

const restoredEntry = await cache.restoreCache([ANDROID_HOME_DIR], restoreKey)
if (restoredEntry) {
core.info(`Found in cache: ${restoredEntry}`)
core.info(`Found in cache: ${restoreKey}`)
} else {
core.info(`Not Found cache: ${restoredEntry}`)
core.info(`Not Found cache: ${restoreKey}`)
}
core.saveState(RESTORED_ENTRY_STATE_KEY, restoredEntry)
return Promise.resolve(restoredEntry)
Expand Down
2 changes: 1 addition & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function getAndroidSdk(
cacheKey
)
if (restoreCacheEntry) {
core.info(`cache hit: ${restoreCacheEntry}`)
core.info(`cache hit: ${restoreCacheEntry.key}`)
return Promise.resolve()
}
}
Expand Down