github actions cache: Use more unique key

This commit is contained in:
Leander Schulten 2024-02-02 22:15:55 +01:00
parent 3f3b0175e8
commit 90b667205b
2 changed files with 14 additions and 2 deletions

11
dist/index.js vendored
View File

@ -1591,11 +1591,12 @@ exports.StateCacheStorage = void 0;
const fs_1 = __importDefault(__nccwpck_require__(7147));
const path_1 = __importDefault(__nccwpck_require__(1017));
const os_1 = __importDefault(__nccwpck_require__(2037));
const process_1 = __importDefault(__nccwpck_require__(7282));
const core = __importStar(__nccwpck_require__(2186));
const github_1 = __nccwpck_require__(5438);
const plugin_retry_1 = __nccwpck_require__(6298);
const cache = __importStar(__nccwpck_require__(7799));
const CACHE_KEY = '_state';
const CACHE_KEY = encodeURIComponent('_state' + process_1.default.env.GITHUB_WORKFLOW + '-' + process_1.default.env.GITHUB_JOB);
const STATE_FILE = 'state.txt';
const STALE_DIR = '56acbeaa-1fef-4c79-8f84-7565e560fb03';
const mkTempDir = () => {
@ -89199,6 +89200,14 @@ module.exports = require("perf_hooks");
/***/ }),
/***/ 7282:
/***/ ((module) => {
"use strict";
module.exports = require("process");
/***/ }),
/***/ 5477:
/***/ ((module) => {

View File

@ -2,12 +2,15 @@ import {IStateStorage} from '../../interfaces/state/state-storage';
import fs from 'fs';
import path from 'path';
import os from 'os';
import process from 'process';
import * as core from '@actions/core';
import {context, getOctokit} from '@actions/github';
import {retry as octokitRetry} from '@octokit/plugin-retry';
import * as cache from '@actions/cache';
const CACHE_KEY = '_state';
const CACHE_KEY = encodeURIComponent(
'_state' + process.env.GITHUB_WORKFLOW + '-' + process.env.GITHUB_JOB
);
const STATE_FILE = 'state.txt';
const STALE_DIR = '56acbeaa-1fef-4c79-8f84-7565e560fb03';