This commit is contained in:
Alex Rodionov 2024-05-31 15:05:52 -07:00
parent c77cd78c8b
commit ddb8388668
4 changed files with 10 additions and 9 deletions

View file

@ -29,11 +29,12 @@ jobs:
repository: bazelbuild/examples
sparse-checkout: java-maven
sparse-checkout-cone-mode: false
- run: mv java-maven/* .
- uses: actions/checkout@v4
with:
path: java-maven/setup-bazel
path: setup-bazel
- run: ls -l
- uses: ./java-maven/setup-bazel/
- uses: ./setup-bazel/
with:
bazelisk-cache: true
bazelisk-version: 1.x

6
dist/main/index.js vendored
View file

@ -96917,7 +96917,7 @@ async function setupBazelisk() {
core.startGroup('Setup Bazelisk')
let toolPath = tc.find('bazelisk', config.bazeliskVersion)
if (toolPath) {
core.debug(`Found in cache @ ${toolPath}`)
core.info(`Found in cache @ ${toolPath}`)
} else {
toolPath = await downloadBazelisk()
}
@ -96968,13 +96968,13 @@ async function downloadBazelisk() {
}
const url = asset.browser_download_url
core.debug(`Downloading from ${url}`)
core.info(`Downloading from ${url}`)
const downloadPath = await tc.downloadTool(url, undefined, `token ${token}`)
core.debug('Adding to the cache...')
fs.chmodSync(downloadPath, '755')
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
core.debug(`Successfully cached bazelisk to ${cachePath}`)
core.info(`Successfully cached bazelisk to ${cachePath}`)
return cachePath
}

File diff suppressed because one or more lines are too long

View file

@ -41,7 +41,7 @@ async function setupBazelisk() {
core.startGroup('Setup Bazelisk')
let toolPath = tc.find('bazelisk', config.bazeliskVersion)
if (toolPath) {
core.debug(`Found in cache @ ${toolPath}`)
core.info(`Found in cache @ ${toolPath}`)
} else {
toolPath = await downloadBazelisk()
}
@ -92,13 +92,13 @@ async function downloadBazelisk() {
}
const url = asset.browser_download_url
core.debug(`Downloading from ${url}`)
core.info(`Downloading from ${url}`)
const downloadPath = await tc.downloadTool(url, undefined, `token ${token}`)
core.debug('Adding to the cache...')
fs.chmodSync(downloadPath, '755')
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
core.debug(`Successfully cached bazelisk to ${cachePath}`)
core.info(`Successfully cached bazelisk to ${cachePath}`)
return cachePath
}