mirror of
https://github.com/actions/cache.git
synced 2025-04-21 19:46:46 +00:00
Removing GHES condition to enabled cache for GHES
This commit is contained in:
parent
611465405c
commit
8bcf0245bb
8 changed files with 2 additions and 96 deletions
12
dist/restore/index.js
vendored
12
dist/restore/index.js
vendored
|
@ -36328,14 +36328,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
||||
exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = void 0;
|
||||
const core = __importStar(__webpack_require__(470));
|
||||
const constants_1 = __webpack_require__(196);
|
||||
function isGhes() {
|
||||
const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com");
|
||||
return ghUrl.hostname.toUpperCase() !== "GITHUB.COM";
|
||||
}
|
||||
exports.isGhes = isGhes;
|
||||
function isExactKeyMatch(key, cacheKey) {
|
||||
return !!(cacheKey &&
|
||||
cacheKey.localeCompare(key, undefined, {
|
||||
|
@ -46719,11 +46714,6 @@ const utils = __importStar(__webpack_require__(443));
|
|||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
if (utils.isGhes()) {
|
||||
utils.logWarning("Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details");
|
||||
utils.setCacheHitOutput(false);
|
||||
return;
|
||||
}
|
||||
// Validate inputs, this can cause task failure
|
||||
if (!utils.isValidEvent()) {
|
||||
utils.logWarning(`Event Validation Error: The event type ${process.env[constants_1.Events.Key]} is not supported because it's not tied to a branch or tag ref.`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue