mirror of
https://github.com/actions/cache.git
synced 2024-11-30 07:19:03 +00:00
Add dist files
This commit is contained in:
parent
4d604c6cce
commit
67f61c6e6b
12
dist/restore/index.js
vendored
12
dist/restore/index.js
vendored
@ -5306,9 +5306,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = void 0;
|
exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
const constants_1 = __webpack_require__(694);
|
const constants_1 = __webpack_require__(694);
|
||||||
|
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) {
|
function isExactKeyMatch(key, cacheKey) {
|
||||||
return !!(cacheKey &&
|
return !!(cacheKey &&
|
||||||
cacheKey.localeCompare(key, undefined, {
|
cacheKey.localeCompare(key, undefined, {
|
||||||
@ -6836,6 +6841,11 @@ const utils = __importStar(__webpack_require__(443));
|
|||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
|
if (utils.isGhes()) {
|
||||||
|
core.info("Cache action is not supported on GHES");
|
||||||
|
utils.setCacheHitOutput(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Validate inputs, this can cause task failure
|
// Validate inputs, this can cause task failure
|
||||||
if (!utils.isValidEvent()) {
|
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.`);
|
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.`);
|
||||||
|
11
dist/save/index.js
vendored
11
dist/save/index.js
vendored
@ -5306,9 +5306,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = void 0;
|
exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
const constants_1 = __webpack_require__(694);
|
const constants_1 = __webpack_require__(694);
|
||||||
|
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) {
|
function isExactKeyMatch(key, cacheKey) {
|
||||||
return !!(cacheKey &&
|
return !!(cacheKey &&
|
||||||
cacheKey.localeCompare(key, undefined, {
|
cacheKey.localeCompare(key, undefined, {
|
||||||
@ -6593,6 +6598,10 @@ const utils = __importStar(__webpack_require__(443));
|
|||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
|
if (utils.isGhes()) {
|
||||||
|
core.info("Cache action is not supported on GHES");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!utils.isValidEvent()) {
|
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.`);
|
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.`);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user