Skip to content

Accelerate via @actions/cache #8

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

Merged
merged 3 commits into from
Feb 18, 2021
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Please note that only the `build-installers` and the `full` flavors are availabl

By default, this Action prints a line whenever 250 items were extracted (this does not work for the `full` flavor, where this Action is silent by default). It can be overridden by setting the input parameter `verbose`; setting it to a number will show updates whenever that many items were extracted. Setting it to `false` will suppress progress updates. Setting it to `true` will print every extracted file (this also works for the `full` flavor).

### Caching

To accelerate this Action, artifacts are cached once downloaded. This can be turned off by setting the input parameter `cache` to `false`.

In practice, caching the `full` artifacts does not provide much of a speed-up. Instead, it slows it down by adding several minutes during with the artifact is cached. Therefore, caching is disabled for the `full` artifacts by default, corresponding to `cache: auto`.

## Developing _this_ Action

> First, you'll need to have a reasonably modern version of `node` handy, such as Node 12.
Expand Down
3 changes: 2 additions & 1 deletion __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ if (process.env.RUN_NETWORK_TESTS !== 'true') {
INPUT_FLAVOR: 'minimal',
INPUT_ARCHITECTURE: 'x86_64',
INPUT_PATH: outputDirectory,
INPUT_VERBOSE: '250'
INPUT_VERBOSE: '250',
INPUT_CACHE: 'true'
}
})
).toEqual(0)
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
required: false
description: 'Whether to log files as they are extracted'
default: '250'
cache:
required: false
description: 'Use @actions/cache to accelerate this Action'
default: 'auto'
runs:
using: 'node12'
main: 'dist/index.js'
Loading