Skip to content

Commit

Permalink
Release 0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed May 20, 2024
1 parent 06441bb commit 57947c1
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 35 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and provides an advanced fine-grained caching to improve workflows performance.
## Usage

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
Expand Down Expand Up @@ -39,15 +39,15 @@ Default `""`.
#### Install Bazelisk 1.x

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
bazelisk-version: 1.x
```

#### Install exact Bazelisk version

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
bazelisk-version: 1.19.0
```
Expand All @@ -67,15 +67,15 @@ Default `""`.
#### Enable Bzlmod

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
bazelrc: common --enable_bzlmod
```

#### Add colors and timestamps

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
bazelrc: |
build --color=yes
Expand All @@ -97,15 +97,15 @@ Default `false`.
#### Share a single disk cache

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
disk-cache: true
```

#### Separate disk caches between workflows

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
disk-cache: ${{ github.workflow }}}
```
Expand All @@ -129,15 +129,15 @@ Default `false`.
#### Enable external repositories caches

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
external-cache: true
```

#### Cache NPM repositories based on `package-lock.json` contents

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
external-cache: |
manifest:
Expand All @@ -147,7 +147,7 @@ Default `false`.
#### Do not cache Ruby on Windows

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
external-cache: |
manifest:
Expand All @@ -167,7 +167,7 @@ Default `""`.
#### Authenticate via key

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
google-credentials: ${{ secrets.GOOGLE_CLOUD_KEY }}
```
Expand All @@ -188,15 +188,15 @@ Default `false`.
#### Store a single repository cache

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
repository-cache: true
```

#### Store a repository cache from a custom location

```yaml
- uses: bazel-contrib/setup-bazel@0.8.1
- uses: bazel-contrib/setup-bazel@0.8.3
with:
repository-cache: examples/gem/WORKSPACE
```
Expand Down
29 changes: 15 additions & 14 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94862,7 +94862,7 @@ const falseTag = {
identify: value => value === false,
default: true,
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),
stringify: boolStringify
};
Expand Down Expand Up @@ -96878,8 +96878,8 @@ async function run() {

async function setupBazel() {
core.startGroup('Configure Bazel')
console.log('Configuration:')
console.log(JSON.stringify(config, null, 2))
core.info('Configuration:')
core.info(JSON.stringify(config, null, 2))

await setupBazelrc()
core.endGroup()
Expand All @@ -96897,18 +96897,19 @@ async function setupBazelisk() {
}

core.startGroup('Setup Bazelisk')
const toolPath = tc.find('bazelisk', config.bazeliskVersion)
let toolPath = tc.find('bazelisk', config.bazeliskVersion)
if (toolPath) {
console.log(`Found in cache @ ${toolPath}`)
core.debug(`Found in cache @ ${toolPath}`)
} else {
await downloadBazelisk()
toolPath = await downloadBazelisk()
}
core.addPath(toolPath)
core.endGroup()
}

async function downloadBazelisk() {
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'.
// Bazelisk filenames use 'amd64' and 'arm64'.
Expand Down Expand Up @@ -96949,15 +96950,15 @@ async function downloadBazelisk() {
}

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}`)

console.log('Adding to the cache...');
core.debug('Adding to the cache...');
fs.chmodSync(downloadPath, '755');
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() {
Expand Down Expand Up @@ -97013,21 +97014,21 @@ async function restoreCache(cacheConfig) {
const restoreKey = `${config.baseCacheKey}-${name}-`
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(
paths, key, [restoreKey],
{ segmentTimeoutInMs: 300000 } // 5 minutes
)

if (restoredKey) {
console.log(`Successfully restored cache from ${restoredKey}`)
core.info(`Successfully restored cache from ${restoredKey}`)

if (restoredKey === key) {
core.saveState(`${name}-cache-hit`, 'true')
}
} else {
console.log(`Failed to restore ${name} cache`)
core.info(`Failed to restore ${name} cache`)
}

core.endGroup()
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93931,7 +93931,7 @@ const falseTag = {
identify: value => value === false,
default: true,
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),
stringify: boolStringify
};
Expand Down Expand Up @@ -96009,9 +96009,9 @@ async function saveCache(cacheConfig) {
{ followSymbolicLinks: false }
)
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)
console.log('Successfully saved cache')
core.info('Successfully saved cache')
} catch (error) {
core.warning(error.stack)
} finally {
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-bazel",
"version": "0.8.1",
"version": "0.8.3",
"description": "Install and configure Bazel for GitHub Actions",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit 57947c1

Please sign in to comment.