diff --git a/flatpak-builder/action.yml b/flatpak-builder/action.yml index f9f2879..a058495 100644 --- a/flatpak-builder/action.yml +++ b/flatpak-builder/action.yml @@ -54,7 +54,7 @@ inputs: cache-key: description: > Defines the cache-key to use. - Defaults to flatpak-builder-${sha256(manifestPath)} + Defaults to flatpak-builder-${arch}-${sha256(manifestPath)} required: false branch: description: The flatpak branch. diff --git a/flatpak-builder/dist/index.js b/flatpak-builder/dist/index.js index 952a996..1419fff 100644 --- a/flatpak-builder/dist/index.js +++ b/flatpak-builder/dist/index.js @@ -2,7 +2,7 @@ /******/ var __webpack_modules__ = ({ /***/ 4682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { const core = __nccwpck_require__(504) const exec = __nccwpck_require__(4859) @@ -72,7 +72,7 @@ class Configuration { if (!this._cacheKey) { try { if (!this._manifestHash) { this._manifestHash = (await computeHash(this.manifestPath)).substring(0, 20) } - return `flatpak-builder-${this._manifestHash}-${this.arch}` + return `flatpak-builder-${this.arch}-${this._manifestHash}` } catch (err) { core.setFailed(`Fail to create create cache key based on manifest hash: ${err}`) } @@ -334,8 +334,7 @@ const prepareBuild = async (config) => { [...CACHE_PATH], // TODO: drop once https://github.com/actions/toolkit/pull/1378 is merged `${cacheKey}`, [ - 'flatpak-builder-', - 'flatpak-' + `flatpak-builder-${this.arch}-` ] ) if (cacheHitKey !== undefined) { diff --git a/flatpak-builder/index.js b/flatpak-builder/index.js index 32bfed4..2cb7fc8 100644 --- a/flatpak-builder/index.js +++ b/flatpak-builder/index.js @@ -66,7 +66,7 @@ class Configuration { if (!this._cacheKey) { try { if (!this._manifestHash) { this._manifestHash = (await computeHash(this.manifestPath)).substring(0, 20) } - return `flatpak-builder-${this._manifestHash}-${this.arch}` + return `flatpak-builder-${this.arch}-${this._manifestHash}` } catch (err) { core.setFailed(`Fail to create create cache key based on manifest hash: ${err}`) } @@ -328,8 +328,7 @@ const prepareBuild = async (config) => { [...CACHE_PATH], // TODO: drop once https://github.com/actions/toolkit/pull/1378 is merged `${cacheKey}`, [ - 'flatpak-builder-', - 'flatpak-' + `flatpak-builder-${this.arch}-` ] ) if (cacheHitKey !== undefined) {