Skip to content

Commit

Permalink
github actions cache: Use more unique key
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort committed Feb 2, 2024
1 parent 3f3b017 commit 90b6672
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -89199,6 +89200,14 @@ module.exports = require("perf_hooks");

/***/ }),

/***/ 7282:
/***/ ((module) => {

"use strict";
module.exports = require("process");

/***/ }),

/***/ 5477:
/***/ ((module) => {

Expand Down
5 changes: 4 additions & 1 deletion src/classes/state/state-cache-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit 90b6672

Please sign in to comment.