Release 0.8.3
This commit is contained in:
parent
06441bbdcd
commit
57947c1f02
7 changed files with 36 additions and 35 deletions
26
README.md
26
README.md
|
|
@ -6,7 +6,7 @@ and provides an advanced fine-grained caching to improve workflows performance.
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
# Avoid downloading Bazel every time.
|
# Avoid downloading Bazel every time.
|
||||||
bazelisk-cache: true
|
bazelisk-cache: true
|
||||||
|
|
@ -39,7 +39,7 @@ Default `""`.
|
||||||
#### Install Bazelisk 1.x
|
#### Install Bazelisk 1.x
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
bazelisk-version: 1.x
|
bazelisk-version: 1.x
|
||||||
```
|
```
|
||||||
|
|
@ -47,7 +47,7 @@ Default `""`.
|
||||||
#### Install exact Bazelisk version
|
#### Install exact Bazelisk version
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
bazelisk-version: 1.19.0
|
bazelisk-version: 1.19.0
|
||||||
```
|
```
|
||||||
|
|
@ -67,7 +67,7 @@ Default `""`.
|
||||||
#### Enable Bzlmod
|
#### Enable Bzlmod
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
bazelrc: common --enable_bzlmod
|
bazelrc: common --enable_bzlmod
|
||||||
```
|
```
|
||||||
|
|
@ -75,7 +75,7 @@ Default `""`.
|
||||||
#### Add colors and timestamps
|
#### Add colors and timestamps
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
bazelrc: |
|
bazelrc: |
|
||||||
build --color=yes
|
build --color=yes
|
||||||
|
|
@ -97,7 +97,7 @@ Default `false`.
|
||||||
#### Share a single disk cache
|
#### Share a single disk cache
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
disk-cache: true
|
disk-cache: true
|
||||||
```
|
```
|
||||||
|
|
@ -105,7 +105,7 @@ Default `false`.
|
||||||
#### Separate disk caches between workflows
|
#### Separate disk caches between workflows
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
disk-cache: ${{ github.workflow }}}
|
disk-cache: ${{ github.workflow }}}
|
||||||
```
|
```
|
||||||
|
|
@ -129,7 +129,7 @@ Default `false`.
|
||||||
#### Enable external repositories caches
|
#### Enable external repositories caches
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
external-cache: true
|
external-cache: true
|
||||||
```
|
```
|
||||||
|
|
@ -137,7 +137,7 @@ Default `false`.
|
||||||
#### Cache NPM repositories based on `package-lock.json` contents
|
#### Cache NPM repositories based on `package-lock.json` contents
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
external-cache: |
|
external-cache: |
|
||||||
manifest:
|
manifest:
|
||||||
|
|
@ -147,7 +147,7 @@ Default `false`.
|
||||||
#### Do not cache Ruby on Windows
|
#### Do not cache Ruby on Windows
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
external-cache: |
|
external-cache: |
|
||||||
manifest:
|
manifest:
|
||||||
|
|
@ -167,7 +167,7 @@ Default `""`.
|
||||||
#### Authenticate via key
|
#### Authenticate via key
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }}
|
google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }}
|
||||||
```
|
```
|
||||||
|
|
@ -188,7 +188,7 @@ Default `false`.
|
||||||
#### Store a single repository cache
|
#### Store a single repository cache
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
repository-cache: true
|
repository-cache: true
|
||||||
```
|
```
|
||||||
|
|
@ -196,7 +196,7 @@ Default `false`.
|
||||||
#### Store a repository cache from a custom location
|
#### Store a repository cache from a custom location
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: bazel-contrib/setup-bazel@0.8.1
|
- uses: bazel-contrib/setup-bazel@0.8.3
|
||||||
with:
|
with:
|
||||||
repository-cache: examples/gem/WORKSPACE
|
repository-cache: examples/gem/WORKSPACE
|
||||||
```
|
```
|
||||||
|
|
|
||||||
29
dist/main/index.js
vendored
29
dist/main/index.js
vendored
|
|
@ -94862,7 +94862,7 @@ const falseTag = {
|
||||||
identify: value => value === false,
|
identify: value => value === false,
|
||||||
default: true,
|
default: true,
|
||||||
tag: 'tag:yaml.org,2002:bool',
|
tag: 'tag:yaml.org,2002:bool',
|
||||||
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
||||||
resolve: () => new Scalar.Scalar(false),
|
resolve: () => new Scalar.Scalar(false),
|
||||||
stringify: boolStringify
|
stringify: boolStringify
|
||||||
};
|
};
|
||||||
|
|
@ -96878,8 +96878,8 @@ async function run() {
|
||||||
|
|
||||||
async function setupBazel() {
|
async function setupBazel() {
|
||||||
core.startGroup('Configure Bazel')
|
core.startGroup('Configure Bazel')
|
||||||
console.log('Configuration:')
|
core.info('Configuration:')
|
||||||
console.log(JSON.stringify(config, null, 2))
|
core.info(JSON.stringify(config, null, 2))
|
||||||
|
|
||||||
await setupBazelrc()
|
await setupBazelrc()
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
@ -96897,18 +96897,19 @@ async function setupBazelisk() {
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGroup('Setup Bazelisk')
|
core.startGroup('Setup Bazelisk')
|
||||||
const toolPath = tc.find('bazelisk', config.bazeliskVersion)
|
let toolPath = tc.find('bazelisk', config.bazeliskVersion)
|
||||||
if (toolPath) {
|
if (toolPath) {
|
||||||
console.log(`Found in cache @ ${toolPath}`)
|
core.debug(`Found in cache @ ${toolPath}`)
|
||||||
} else {
|
} else {
|
||||||
await downloadBazelisk()
|
toolPath = await downloadBazelisk()
|
||||||
}
|
}
|
||||||
|
core.addPath(toolPath)
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadBazelisk() {
|
async function downloadBazelisk() {
|
||||||
const version = config.bazeliskVersion
|
const version = config.bazeliskVersion
|
||||||
console.log(`Attempting to download ${version}`)
|
core.debug(`Attempting to download ${version}`)
|
||||||
|
|
||||||
// Possible values are 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x' and 'x64'.
|
// Possible values are 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x' and 'x64'.
|
||||||
// Bazelisk filenames use 'amd64' and 'arm64'.
|
// Bazelisk filenames use 'amd64' and 'arm64'.
|
||||||
|
|
@ -96949,15 +96950,15 @@ async function downloadBazelisk() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = asset.browser_download_url
|
const url = asset.browser_download_url
|
||||||
console.log(`Downloading from ${url}`)
|
core.debug(`Downloading from ${url}`)
|
||||||
const downloadPath = await tc.downloadTool(url, undefined, `token ${token}`)
|
const downloadPath = await tc.downloadTool(url, undefined, `token ${token}`)
|
||||||
|
|
||||||
console.log('Adding to the cache...');
|
core.debug('Adding to the cache...');
|
||||||
fs.chmodSync(downloadPath, '755');
|
fs.chmodSync(downloadPath, '755');
|
||||||
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
|
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
|
||||||
console.log(`Successfully cached bazelisk to ${cachePath}`)
|
core.debug(`Successfully cached bazelisk to ${cachePath}`)
|
||||||
|
|
||||||
core.addPath(cachePath)
|
return cachePath
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setupBazelrc() {
|
async function setupBazelrc() {
|
||||||
|
|
@ -97013,7 +97014,7 @@ async function restoreCache(cacheConfig) {
|
||||||
const restoreKey = `${config.baseCacheKey}-${name}-`
|
const restoreKey = `${config.baseCacheKey}-${name}-`
|
||||||
const key = `${restoreKey}${hash}`
|
const key = `${restoreKey}${hash}`
|
||||||
|
|
||||||
console.log(`Attempting to restore ${name} cache from ${key}`)
|
core.debug(`Attempting to restore ${name} cache from ${key}`)
|
||||||
|
|
||||||
const restoredKey = await cache.restoreCache(
|
const restoredKey = await cache.restoreCache(
|
||||||
paths, key, [restoreKey],
|
paths, key, [restoreKey],
|
||||||
|
|
@ -97021,13 +97022,13 @@ async function restoreCache(cacheConfig) {
|
||||||
)
|
)
|
||||||
|
|
||||||
if (restoredKey) {
|
if (restoredKey) {
|
||||||
console.log(`Successfully restored cache from ${restoredKey}`)
|
core.info(`Successfully restored cache from ${restoredKey}`)
|
||||||
|
|
||||||
if (restoredKey === key) {
|
if (restoredKey === key) {
|
||||||
core.saveState(`${name}-cache-hit`, 'true')
|
core.saveState(`${name}-cache-hit`, 'true')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`Failed to restore ${name} cache`)
|
core.info(`Failed to restore ${name} cache`)
|
||||||
}
|
}
|
||||||
|
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
|
||||||
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
6
dist/post/index.js
vendored
6
dist/post/index.js
vendored
|
|
@ -93931,7 +93931,7 @@ const falseTag = {
|
||||||
identify: value => value === false,
|
identify: value => value === false,
|
||||||
default: true,
|
default: true,
|
||||||
tag: 'tag:yaml.org,2002:bool',
|
tag: 'tag:yaml.org,2002:bool',
|
||||||
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
||||||
resolve: () => new Scalar.Scalar(false),
|
resolve: () => new Scalar.Scalar(false),
|
||||||
stringify: boolStringify
|
stringify: boolStringify
|
||||||
};
|
};
|
||||||
|
|
@ -96009,9 +96009,9 @@ async function saveCache(cacheConfig) {
|
||||||
{ followSymbolicLinks: false }
|
{ followSymbolicLinks: false }
|
||||||
)
|
)
|
||||||
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
|
||||||
console.log(`Attempting to save ${paths} cache to ${key}`)
|
core.debug(`Attempting to save ${paths} cache to ${key}`)
|
||||||
await cache.saveCache(paths, key)
|
await cache.saveCache(paths, key)
|
||||||
console.log('Successfully saved cache')
|
core.info('Successfully saved cache')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.warning(error.stack)
|
core.warning(error.stack)
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "setup-bazel",
|
"name": "setup-bazel",
|
||||||
"version": "0.8.1",
|
"version": "0.8.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "setup-bazel",
|
"name": "setup-bazel",
|
||||||
"version": "0.8.1",
|
"version": "0.8.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^3.2.2",
|
"@actions/cache": "^3.2.2",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "setup-bazel",
|
"name": "setup-bazel",
|
||||||
"version": "0.8.1",
|
"version": "0.8.3",
|
||||||
"description": "Install and configure Bazel for GitHub Actions",
|
"description": "Install and configure Bazel for GitHub Actions",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue