mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-14 23:11:14 +00:00
chore: generate
This commit is contained in:
parent
497a31d54e
commit
430c825860
2 changed files with 18 additions and 8 deletions
13
dist/post_run/index.js
generated
vendored
13
dist/post_run/index.js
generated
vendored
|
|
@ -88824,12 +88824,17 @@ const getIntervalKey = (invalidationIntervalDays) => {
|
||||||
};
|
};
|
||||||
async function buildCacheKeys() {
|
async function buildCacheKeys() {
|
||||||
const keys = [];
|
const keys = [];
|
||||||
const invalidationIntervalDays = parseInt(core.getInput(`cache-invalidation-interval`, { required: true }).trim());
|
// Cache by OS.
|
||||||
// Periodically invalidate a cache because a new code being added.
|
let cacheKey = `golangci-lint.cache-${process.env?.RUNNER_OS}-`;
|
||||||
let cacheKey = `golangci-lint.cache-${getIntervalKey(invalidationIntervalDays)}-`;
|
|
||||||
keys.push(cacheKey);
|
|
||||||
// Get working directory from input
|
// Get working directory from input
|
||||||
const workingDirectory = core.getInput(`working-directory`);
|
const workingDirectory = core.getInput(`working-directory`);
|
||||||
|
if (workingDirectory) {
|
||||||
|
cacheKey += `${workingDirectory}-`;
|
||||||
|
}
|
||||||
|
// Periodically invalidate a cache because a new code being added.
|
||||||
|
const invalidationIntervalDays = parseInt(core.getInput(`cache-invalidation-interval`, { required: true }).trim());
|
||||||
|
cacheKey += `${getIntervalKey(invalidationIntervalDays)}-`;
|
||||||
|
keys.push(cacheKey);
|
||||||
// create path to go.mod prepending the workingDirectory if it exists
|
// create path to go.mod prepending the workingDirectory if it exists
|
||||||
const goModPath = path_1.default.join(workingDirectory, `go.mod`);
|
const goModPath = path_1.default.join(workingDirectory, `go.mod`);
|
||||||
core.info(`Checking for go.mod: ${goModPath}`);
|
core.info(`Checking for go.mod: ${goModPath}`);
|
||||||
|
|
|
||||||
13
dist/run/index.js
generated
vendored
13
dist/run/index.js
generated
vendored
|
|
@ -88824,12 +88824,17 @@ const getIntervalKey = (invalidationIntervalDays) => {
|
||||||
};
|
};
|
||||||
async function buildCacheKeys() {
|
async function buildCacheKeys() {
|
||||||
const keys = [];
|
const keys = [];
|
||||||
const invalidationIntervalDays = parseInt(core.getInput(`cache-invalidation-interval`, { required: true }).trim());
|
// Cache by OS.
|
||||||
// Periodically invalidate a cache because a new code being added.
|
let cacheKey = `golangci-lint.cache-${process.env?.RUNNER_OS}-`;
|
||||||
let cacheKey = `golangci-lint.cache-${getIntervalKey(invalidationIntervalDays)}-`;
|
|
||||||
keys.push(cacheKey);
|
|
||||||
// Get working directory from input
|
// Get working directory from input
|
||||||
const workingDirectory = core.getInput(`working-directory`);
|
const workingDirectory = core.getInput(`working-directory`);
|
||||||
|
if (workingDirectory) {
|
||||||
|
cacheKey += `${workingDirectory}-`;
|
||||||
|
}
|
||||||
|
// Periodically invalidate a cache because a new code being added.
|
||||||
|
const invalidationIntervalDays = parseInt(core.getInput(`cache-invalidation-interval`, { required: true }).trim());
|
||||||
|
cacheKey += `${getIntervalKey(invalidationIntervalDays)}-`;
|
||||||
|
keys.push(cacheKey);
|
||||||
// create path to go.mod prepending the workingDirectory if it exists
|
// create path to go.mod prepending the workingDirectory if it exists
|
||||||
const goModPath = path_1.default.join(workingDirectory, `go.mod`);
|
const goModPath = path_1.default.join(workingDirectory, `go.mod`);
|
||||||
core.info(`Checking for go.mod: ${goModPath}`);
|
core.info(`Checking for go.mod: ${goModPath}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue