fix post-if usage (#28)

This commit is contained in:
Gaëtan Lehmann 2023-09-01 19:23:39 +02:00 committed by GitHub
parent a727219927
commit be3fe0c1f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 3 deletions

View File

@ -75,7 +75,6 @@ It is also possible to use [act](https://github.com/nektos/act) to test the cont
The action can be configured with the following arguments:
- `version` - The version of earthly to install. Default is `latest`. Accepts semver style values.
- `github-token` (optional) - Token used to query earthly versions.
- `prerelease` (optional) - allow prerelease versions.
- `use-cache` (optional) - whether to use the cache to store earthly or not.
- `github-token` (optional) - GitHub token for fetching earthly version list. Recommended to avoid GitHub API ratelimit.

View File

@ -20,4 +20,3 @@ runs:
using: node16
main: dist/setup/index.js
post: "dist/cache-save/index.js"
post-if: inputs.use-cache == 'true'

View File

@ -62434,6 +62434,10 @@ const cacheBinary = () => __awaiter(void 0, void 0, void 0, function* () {
if (!utils.isCacheFeatureAvailable()) {
return;
}
if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache save as use-cache is not true`);
return;
}
const state = core.getState(constants_1.State.CacheMatchedKey);
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
const path = core.getState(constants_1.State.BinaryPath);

File diff suppressed because one or more lines are too long

View File

@ -31,6 +31,11 @@ export const cacheBinary = async () => {
return;
}
if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache save as use-cache is not true`);
return;
}
const state = core.getState(State.CacheMatchedKey);
const primaryKey = core.getState(State.CachePrimaryKey);
const path = core.getState(State.BinaryPath);