diff --git a/README.md b/README.md index 75100f3..16f958d 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ Options: --cache-map The map of actions source to container destination paths for the cache paths --scratch-dir Where the action is stores some temporary files for its processing. Default: 'scratch' --skip-extraction Skip the extraction of the cache from the docker container + --builder The name of the buildx builder. Default: 'default' --help Show this help ``` diff --git a/action.yml b/action.yml index bba66d6..2ec08d9 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,9 @@ inputs: utility-image: default: "ghcr.io/containerd/busybox:latest" description: "The container image to use for injecting and extracting the cache" + builder: + default: default + description: "The name of the builder. Default: 'default'" runs: using: 'node20' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index 212effe..2bc052d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -689,6 +689,7 @@ function $76d06fcdc9bff1f5$export$77714ac6976d0316(args) { "skip-extraction": ((0, $bbb9dac42384d004$exports.getInput)("skip-extraction") || "false") === "true", "extract": process.env[`STATE_POST`] !== undefined, "utility-image": (0, $bbb9dac42384d004$exports.getInput)("utility-image") || "ghcr.io/containerd/busybox:latest", + "builder": (0, $bbb9dac42384d004$exports.getInput)("builder") || "default", "help": false }, string: [ @@ -696,7 +697,8 @@ function $76d06fcdc9bff1f5$export$77714ac6976d0316(args) { "scratch-dir", "cache-source", "cache-target", - "utility-image" + "utility-image", + "builder" ], boolean: [ "skip-extraction", @@ -727,6 +729,7 @@ Options: --scratch-dir Where the action is stores some temporary files for its processing. Default: 'scratch' --skip-extraction Skip the extraction of the cache from the docker container --utility-image The container image to use for injecting and extracting the cache. Default: 'ghcr.io/containerd/busybox:latest' + --builder The name of the buildx builder to use for the cache injection --help Show this help `); } @@ -773,6 +776,9 @@ function $76d06fcdc9bff1f5$export$238315f403b84074(cacheOptions) { return `type=cache,${otherOptions}`; } } +function $76d06fcdc9bff1f5$export$932deacb99c42350(opts) { + return opts["builder"] == null || opts["builder"] == "" ? "default" : opts["builder"]; +} var $03c48d50d9d7039f$exports = {}; @@ -1263,7 +1269,7 @@ function $4c028fad90f63861$var$assertSuccess(cp) { -async function $bd1d73aff0732146$var$injectCache(cacheSource, cacheOptions, scratchDir, containerImage) { +async function $bd1d73aff0732146$var$injectCache(cacheSource, cacheOptions, scratchDir, containerImage, builder) { // Clean Scratch Directory await (0, $evV72$fspromises).rm(scratchDir, { recursive: true, @@ -1300,6 +1306,8 @@ RUN --mount=${mountArgs} \ await (0, $4c028fad90f63861$export$889ea624f2cb2c57)("docker", [ "buildx", "build", + "--builder", + builder, "-f", (0, $evV72$path).join(scratchDir, "Dancefile.inject"), "--tag", @@ -1321,8 +1329,9 @@ async function $bd1d73aff0732146$export$38c65e9f06d3d433(opts) { const cacheMap = (0, $76d06fcdc9bff1f5$export$8550a4d7282a21d0)(opts); const scratchDir = opts["scratch-dir"]; const containerImage = opts["utility-image"]; + const builder = (0, $76d06fcdc9bff1f5$export$932deacb99c42350)(opts); // Inject Caches for each source-target pair - for (const [cacheSource, cacheOptions] of Object.entries(cacheMap))await $bd1d73aff0732146$var$injectCache(cacheSource, cacheOptions, scratchDir, containerImage); + for (const [cacheSource, cacheOptions] of Object.entries(cacheMap))await $bd1d73aff0732146$var$injectCache(cacheSource, cacheOptions, scratchDir, containerImage, builder); } @@ -1330,7 +1339,7 @@ async function $bd1d73aff0732146$export$38c65e9f06d3d433(opts) { -async function $8d40300f3635b768$var$extractCache(cacheSource, cacheOptions, scratchDir, containerImage) { +async function $8d40300f3635b768$var$extractCache(cacheSource, cacheOptions, scratchDir, containerImage, builder) { // Prepare Timestamp for Layer Cache Busting const date = new Date().toISOString(); await (0, $evV72$fspromises).mkdir(scratchDir, { @@ -1353,6 +1362,8 @@ RUN --mount=${mountArgs} \ await (0, $4c028fad90f63861$export$889ea624f2cb2c57)("docker", [ "buildx", "build", + "--builder", + builder, "-f", (0, $evV72$path).join(scratchDir, "Dancefile.extract"), "--tag", @@ -1412,8 +1423,9 @@ async function $8d40300f3635b768$export$bd3cfa0c41fc7012(opts) { const cacheMap = (0, $76d06fcdc9bff1f5$export$8550a4d7282a21d0)(opts); const scratchDir = opts["scratch-dir"]; const containerImage = opts["utility-image"]; + const builder = (0, $76d06fcdc9bff1f5$export$932deacb99c42350)(opts); // Extract Caches for each source-target pair - for (const [cacheSource, cacheOptions] of Object.entries(cacheMap))await $8d40300f3635b768$var$extractCache(cacheSource, cacheOptions, scratchDir, containerImage); + for (const [cacheSource, cacheOptions] of Object.entries(cacheMap))await $8d40300f3635b768$var$extractCache(cacheSource, cacheOptions, scratchDir, containerImage, builder); } diff --git a/dist/index.js.map b/dist/index.js.map index 141332f..f815ec9 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAiB;AACjB,4BAAM,IAAI,GAAG;;AAIb,SAAS,mCAAc,IAAI,EAAE,OAAO;IAClC,IAAI,UAAU,QAAQ,OAAO,KAAK,YAChC,QAAQ,OAAO,GAAG,QAAQ,GAAG,CAAC,OAAO;IAEvC,IAAI,CAAC,SACH,OAAO;IAGT,UAAU,QAAQ,KAAK,CAAC;IACxB,IAAI,QAAQ,OAAO,CAAC,QAAQ,IAC1B,OAAO;IAET,IAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,MAAM,EAAE,IAAK;QACvC,IAAI,IAAI,OAAO,CAAC,EAAE,CAAC,WAAW;QAC9B,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,OAAO,GAChD,OAAO;IAEX;IACA,OAAO;AACT;AAEA,SAAS,gCAAW,IAAI,EAAE,IAAI,EAAE,OAAO;IACrC,IAAI,CAAC,KAAK,cAAc,MAAM,CAAC,KAAK,MAAM,IACxC,OAAO;IAET,OAAO,mCAAa,MAAM;AAC5B;AAEA,SAAS,4BAAO,IAAI,EAAE,OAAO,EAAE,EAAE;IAC/B,YAAQ,MAAM,SAAU,EAAE,EAAE,IAAI;QAC9B,GAAG,IA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CAAa,aAAa,cAAc,YAAY;AAElE;;;;AzBxDA,eAAe,2BAAK,IAAc;IAChC,MAAM,OAAO,CAAA,GAAA,yCAAQ,EAAE;IAEvB,IAAI,KAAK,IAAI,EACX,OAAO,CAAA,GAAA,yCAAG;IAGZ,IAAI,KAAK,OAAO,EACd,oBAAoB;IACpB,MAAM,CAAA,GAAA,yCAAY,EAAE;SACf;QACL,mCAAmC;QACnC,IAAI,QAAQ,GAAG,CAAC,YAAY,KAAK,WAC/B,MAAM,CAAA,GAAA,iBAAC,EAAE,UAAU,CAAC,QAAQ,GAAG,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAA,GAAA,SAAC,EAAE,GAAG,CAAC,CAAC;QAEpE,MAAM,CAAA,GAAA,yCAAW,EAAE;IACrB;AACF;AAEA,IAAI;IACF,MAAM,2BAAK,QAAQ,IAAI;AACzB,EAAE,OAAO,KAAK;IACZ,QAAQ,KAAK,CAAC;IACd,IAAI,eAAe,OACjB,QAAQ,KAAK,CAAC,IAAI,KAAK;IAEzB,QAAQ,IAAI,CAAC;AACf","sources":["node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","src/index.ts","src/inject-cache.ts","src/opts.ts","node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/core.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/core.ts","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/command.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/command.ts","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/utils.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/utils.ts","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/file-command.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/file-command.ts","src/run.ts","node_modules/.pnpm/spawn-please@3.0.0/node_modules/spawn-please/src/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","src/extract-cache.ts"],"sourcesContent":["module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","import fs from \"fs/promises\";\nimport os from \"os\";\nimport { injectCaches } from \"./inject-cache.js\";\nimport { extractCaches } from \"./extract-cache.js\";\nimport { help, parseOpts } from \"./opts.js\";\n\nasync function main(args: string[]) {\n const opts = parseOpts(args);\n\n if (opts.help) {\n return help();\n }\n\n if (opts.extract) {\n // Run the post step\n await extractCaches(opts);\n } else {\n // Otherwise, this is the main step\n if (process.env.GITHUB_STATE !== undefined) {\n await fs.appendFile(process.env.GITHUB_STATE, `POST=true${os.EOL}`);\n }\n await injectCaches(opts);\n }\n}\n\ntry {\n await main(process.argv);\n} catch (err) {\n console.error(err);\n if (err instanceof Error) {\n console.error(err.stack);\n }\n process.exit(1);\n}\n","import fs from 'fs/promises';\nimport path from 'path';\nimport { CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath, getUID, getGID } from './opts.js';\nimport { run } from './run.js';\nimport { notice } from '@actions/core';\n\nasync function injectCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string) {\n // Clean Scratch Directory\n await fs.rm(scratchDir, { recursive: true, force: true });\n await fs.mkdir(scratchDir, { recursive: true });\n\n // Prepare Cache Source Directory\n await fs.mkdir(cacheSource, { recursive: true });\n\n // Prepare Timestamp for Layer Cache Busting\n const date = new Date().toISOString();\n await fs.writeFile(path.join(cacheSource, 'buildstamp'), date);\n\n const targetPath = getTargetPath(cacheOptions);\n const mountArgs = getMountArgsString(cacheOptions);\n\n // If UID OR GID are set, then add chown to restore files ownership.\n let ownershipCommand = \"\";\n const uid = getUID(cacheOptions);\n const gid = getGID(cacheOptions);\n if (uid !== \"\" || gid !== \"\") {\n ownershipCommand = `&& chown -R ${uid}:${gid} ${targetPath}`\n }\n\n // Prepare Dancefile to Access Caches\n const dancefileContent = `\nFROM ${containerImage}\nCOPY buildstamp buildstamp\nRUN --mount=${mountArgs} \\\n --mount=type=bind,source=.,target=/var/dance-cache \\\n cp -p -R /var/dance-cache/. ${targetPath} ${ownershipCommand} || true\n`;\n await fs.writeFile(path.join(scratchDir, 'Dancefile.inject'), dancefileContent);\n console.log(dancefileContent);\n\n // Inject Data into Docker Cache\n await run('docker', ['buildx', 'build', '-f', path.join(scratchDir, 'Dancefile.inject'), '--tag', 'dance:inject', cacheSource]);\n\n // Clean Directories\n try {\n await fs.rm(cacheSource, { recursive: true, force: true });\n } catch (err) {\n // Ignore Cleaning Errors\n notice(`Error while cleaning cache source directory: ${err}. Ignoring...`);\n }\n}\n\n\nexport async function injectCaches(opts: Opts) {\n const cacheMap = getCacheMap(opts);\n const scratchDir = opts['scratch-dir'];\n const containerImage = opts['utility-image'];\n\n // Inject Caches for each source-target pair\n for (const [cacheSource, cacheOptions] of Object.entries(cacheMap)) {\n await injectCache(cacheSource, cacheOptions, scratchDir, containerImage);\n }\n}\n","import mri from 'mri';\nimport { getInput, warning } from '@actions/core';\n\nexport type Opts = {\n \"extract\": boolean\n \"cache-map\": string\n \"scratch-dir\": string\n \"skip-extraction\": boolean\n \"utility-image\": string\n help: boolean\n /** @deprecated Use `cache-map` instead */\n \"cache-source\"?: string\n /** @deprecated Use `cache-map` instead */\n \"cache-target\"?: string\n}\n\nexport function parseOpts(args: string[]): mri.Argv {\n const opts = mri(args, {\n default: {\n \"cache-map\": getInput(\"cache-map\") || \"{}\",\n \"scratch-dir\": getInput(\"scratch-dir\") || \"scratch\",\n \"skip-extraction\": (getInput(\"skip-extraction\") || \"false\") === \"true\",\n \"extract\": process.env[`STATE_POST`] !== undefined,\n \"utility-image\": getInput(\"utility-image\") || \"ghcr.io/containerd/busybox:latest\",\n \"help\": false,\n },\n string: [\"cache-map\", \"scratch-dir\", \"cache-source\", \"cache-target\", \"utility-image\"],\n boolean: [\"skip-extraction\", \"help\", \"extract\"],\n alias: {\n \"help\": [\"h\"],\n },\n })\n\n if (opts[\"cache-source\"] && opts[\"cache-target\"]) {\n warning(\"The `cache-source` and `cache-target` options are deprecated. Use `cache-map` instead.\")\n\n opts[\"cache-map\"] = JSON.stringify({\n [opts[\"cache-source\"]]: opts[\"cache-target\"],\n });\n }\n\n return opts;\n}\n\nexport function help() {\n console.log(`build-cache-dance [options]\nSave 'RUN --mount=type=cache' caches on GitHub Actions or other CI platforms\n\nOptions:\n --extract Extract the cache from the docker container (extract step). Otherwise, inject the cache (main step)\n --cache-map The map of actions source paths to container destination paths or mount arguments\n --scratch-dir Where the action is stores some temporary files for its processing. Default: 'scratch'\n --skip-extraction Skip the extraction of the cache from the docker container\n --utility-image The container image to use for injecting and extracting the cache. Default: 'ghcr.io/containerd/busybox:latest'\n --help Show this help\n`);\n}\n\nexport type SourcePath = string\nexport type TargetPath = string\nexport type ToStringable = {\n toString(): string;\n}\nexport type CacheOptions = TargetPath | { target: TargetPath } & Record\nexport type CacheMap = Record\n\nexport function getCacheMap(opts: Opts): CacheMap {\n try {\n return JSON.parse(opts[\"cache-map\"]) as CacheMap;\n } catch (e) {\n throw new Error(`Failed to parse cache map. Expected JSON, got:\\n${opts[\"cache-map\"]}\\n${e}`);\n }\n}\n\nexport function getTargetPath(cacheOptions: CacheOptions): TargetPath {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return cacheOptions;\n } else {\n // object is provided\n if (\"target\" in cacheOptions) {\n return cacheOptions.target;\n } else {\n throw new Error(`Expected the 'target' key in the cache options, got:\\n${cacheOptions}`);\n }\n }\n}\n\nexport function getUID(cacheOptions: CacheOptions): string {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return \"\";\n } else {\n // object is provided\n if (\"uid\" in cacheOptions && cacheOptions.uid !== undefined) {\n return cacheOptions.uid.toString();\n } else {\n return \"\";\n }\n }\n}\n\nexport function getGID(cacheOptions: CacheOptions): string {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return \"\";\n } else {\n // object is provided\n if (\"gid\" in cacheOptions && cacheOptions.gid !== undefined) {\n return cacheOptions.gid.toString();\n } else {\n return \"\";\n }\n }\n}\n\n/**\n * Convert a cache options to a string that is passed to --mount=\n * @param CacheOptions The cache options to convert to a string\n */\nexport function getMountArgsString(cacheOptions: CacheOptions): string {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return `type=cache,target=${cacheOptions}`;\n } else {\n // other options are provided\n const otherOptions = Object.entries(cacheOptions).map(([key, value]) => `${key}=${value}`).join(\",\");\n return `type=cache,${otherOptions}`;\n }\n}\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n",null,null,null,null,null,null,null,null,"import spawnPlease from 'spawn-please'\nimport cp, { type ChildProcess } from 'child_process';\n\nexport async function run(command: string, args: string[]) {\n try {\n return await spawnPlease(command, args);\n } catch (error) {\n console.error(`Error running command: ${command} ${args.join(' ')}`);\n throw error;\n }\n}\n\nexport async function runPiped([command1, args1]: [string, string[]], [command2, args2]: [string, string[]]) {\n const cp1 = cp.spawn(command1, args1, { stdio: ['inherit', 'pipe', 'inherit'] });\n const cp2 = cp.spawn(command2, args2, { stdio: ['pipe', 'inherit', 'inherit'] });\n\n cp1.stdout.pipe(cp2.stdin);\n\n await Promise.all([assertSuccess(cp1), assertSuccess(cp2)]);\n}\n\nfunction assertSuccess(cp: ChildProcess) {\n return new Promise((resolve, reject) => {\n cp.on('error', (error) => {\n reject(error);\n });\n cp.on('close', (code) => {\n if (code !== 0) {\n reject(new Error(`process exited with code ${code}`));\n }\n resolve();\n });\n });\n}\n","const spawn = require('cross-spawn')\n\n/** Spawns a child process, as long as you ask nicely.\n * \n * @param {string} command - The shell command to execute.\n * @param {string[]} [args] - An array of arguments that are given after the command.\n * @param {{ rejectOnError?: boolean, stdin?: string, stderr?: (data: string) => void, stdout?: (data: string) => void }} [options] - Options.\n * @param {any} [spawnOptions] - Options that are passed directly to child_process.spawn. Also supports stdin: string.\n * @returns {Promise<{ stdout: string, stderr: string }>}\n */\nconst spawnPlease = (command, args, options={}, spawnOptions={}) => {\n // defaults\n if (options.rejectOnError === undefined) {\n options.rejectOnError = true\n }\n\n let stdout = ''\n let stderr = ''\n const child = spawn(command, args, spawnOptions)\n\n return new Promise((resolve, reject) => {\n if (options.stdin !== undefined && options.stdin != null) {\n child.stdin.write(options.stdin)\n }\n child.stdin.end()\n\n child.stdout.on('data', data => {\n stdout += data\n if (options.stdout) options.stdout(data)\n })\n\n child.stderr.on('data', data => {\n stderr += data\n if (options.stderr) options.stderr(data)\n })\n\n if (options.rejectOnError) {\n child.addListener('error', reject)\n }\n\n child.on('close', code => {\n if (code !== 0 && options.rejectOnError) {\n reject(stderr)\n } else {\n resolve({ stdout, stderr })\n }\n })\n })\n}\n\nmodule.exports = spawnPlease\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","import fs from 'fs/promises';\nimport path from 'path';\nimport { CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath } from './opts.js';\nimport { run, runPiped } from './run.js';\n\nasync function extractCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string) {\n // Prepare Timestamp for Layer Cache Busting\n const date = new Date().toISOString();\n\n await fs.mkdir(scratchDir, { recursive: true });\n await fs.writeFile(path.join(scratchDir, 'buildstamp'), date);\n\n // Prepare Dancefile to Access Caches\n const targetPath = getTargetPath(cacheOptions);\n const mountArgs = getMountArgsString(cacheOptions);\n\n const dancefileContent = `\nFROM ${containerImage}\nCOPY buildstamp buildstamp\nRUN --mount=${mountArgs} \\\n mkdir -p /var/dance-cache/ \\\n && cp -p -R ${targetPath}/. /var/dance-cache/ || true\n`;\n await fs.writeFile(path.join(scratchDir, 'Dancefile.extract'), dancefileContent);\n console.log(dancefileContent);\n\n // Extract Data into Docker Image\n await run('docker', ['buildx', 'build', '-f', path.join(scratchDir, 'Dancefile.extract'), '--tag', 'dance:extract', '--load', scratchDir]);\n\n // Create Extraction Image\n try {\n await run('docker', ['rm', '-f', 'cache-container']);\n } catch (error) {\n // Ignore error if container does not exist\n }\n await run('docker', ['create', '-ti', '--name', 'cache-container', 'dance:extract']);\n\n // Unpack Docker Image into Scratch\n await runPiped(\n ['docker', ['cp', '-L', 'cache-container:/var/dance-cache', '-']],\n ['tar', ['-H', 'posix', '-x', '-C', scratchDir]]\n );\n\n // Move Cache into Its Place\n await run('sudo', ['rm', '-rf', cacheSource]);\n await fs.rename(path.join(scratchDir, 'dance-cache'), cacheSource);\n}\n\nexport async function extractCaches(opts: Opts) {\n if (opts[\"skip-extraction\"]) {\n console.log(\"skip-extraction is set. Skipping extraction step...\");\n return;\n }\n\n const cacheMap = getCacheMap(opts);\n const scratchDir = opts['scratch-dir'];\n const containerImage = opts['utility-image'];\n\n // Extract Caches for each source-target pair\n for (const [cacheSource, cacheOptions] of Object.entries(cacheMap)) {\n await extractCache(cacheSource, cacheOptions, scratchDir, containerImage);\n }\n}\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAiB;AACjB,4BAAM,IAAI,GAAG;;AAIb,SAAS,mCAAc,IAAI,EAAE,OAAO;IAClC,IAAI,UAAU,QAAQ,OAAO,KAAK,YAChC,QAAQ,OAAO,GAAG,QAAQ,GAAG,CAAC,OAAO;IAEvC,IAAI,CAAC,SACH,OAAO;IAGT,UAAU,QAAQ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G,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAA,GAAA,SAAC,EAAE,GAAG,CAAC,CAAC;QAEpE,MAAM,CAAA,GAAA,yCAAW,EAAE;IACrB;AACF;AAEA,IAAI;IACF,MAAM,2BAAK,QAAQ,IAAI;AACzB,EAAE,OAAO,KAAK;IACZ,QAAQ,KAAK,CAAC;IACd,IAAI,eAAe,OACjB,QAAQ,KAAK,CAAC,IAAI,KAAK;IAEzB,QAAQ,IAAI,CAAC;AACf","sources":["node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","src/index.ts","src/inject-cache.ts","src/opts.ts","node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/core.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/core.ts","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/command.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/command.ts","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/utils.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/utils.ts","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/lib/file-command.js","node_modules/.pnpm/@actions+core@1.5.0/node_modules/@actions/core/src/file-command.ts","src/run.ts","node_modules/.pnpm/spawn-please@3.0.0/node_modules/spawn-please/src/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","src/extract-cache.ts"],"sourcesContent":["module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","import fs from \"fs/promises\";\nimport os from \"os\";\nimport { injectCaches } from \"./inject-cache.js\";\nimport { extractCaches } from \"./extract-cache.js\";\nimport { help, parseOpts } from \"./opts.js\";\n\nasync function main(args: string[]) {\n const opts = parseOpts(args);\n\n if (opts.help) {\n return help();\n }\n\n if (opts.extract) {\n // Run the post step\n await extractCaches(opts);\n } else {\n // Otherwise, this is the main step\n if (process.env.GITHUB_STATE !== undefined) {\n await fs.appendFile(process.env.GITHUB_STATE, `POST=true${os.EOL}`);\n }\n await injectCaches(opts);\n }\n}\n\ntry {\n await main(process.argv);\n} catch (err) {\n console.error(err);\n if (err instanceof Error) {\n console.error(err.stack);\n }\n process.exit(1);\n}\n","import fs from 'fs/promises';\nimport path from 'path';\nimport { CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath, getUID, getGID, getBuilder } from './opts.js';\nimport { run } from './run.js';\nimport { notice } from '@actions/core';\n\nasync function injectCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string, builder: string) {\n // Clean Scratch Directory\n await fs.rm(scratchDir, { recursive: true, force: true });\n await fs.mkdir(scratchDir, { recursive: true });\n\n // Prepare Cache Source Directory\n await fs.mkdir(cacheSource, { recursive: true });\n\n // Prepare Timestamp for Layer Cache Busting\n const date = new Date().toISOString();\n await fs.writeFile(path.join(cacheSource, 'buildstamp'), date);\n\n const targetPath = getTargetPath(cacheOptions);\n const mountArgs = getMountArgsString(cacheOptions);\n\n // If UID OR GID are set, then add chown to restore files ownership.\n let ownershipCommand = \"\";\n const uid = getUID(cacheOptions);\n const gid = getGID(cacheOptions);\n if (uid !== \"\" || gid !== \"\") {\n ownershipCommand = `&& chown -R ${uid}:${gid} ${targetPath}`\n }\n\n // Prepare Dancefile to Access Caches\n const dancefileContent = `\nFROM ${containerImage}\nCOPY buildstamp buildstamp\nRUN --mount=${mountArgs} \\\n --mount=type=bind,source=.,target=/var/dance-cache \\\n cp -p -R /var/dance-cache/. ${targetPath} ${ownershipCommand} || true\n`;\n await fs.writeFile(path.join(scratchDir, 'Dancefile.inject'), dancefileContent);\n console.log(dancefileContent);\n\n // Inject Data into Docker Cache\n await run('docker', ['buildx', 'build', '--builder', builder ,'-f', path.join(scratchDir, 'Dancefile.inject'), '--tag', 'dance:inject', cacheSource]);\n\n // Clean Directories\n try {\n await fs.rm(cacheSource, { recursive: true, force: true });\n } catch (err) {\n // Ignore Cleaning Errors\n notice(`Error while cleaning cache source directory: ${err}. Ignoring...`);\n }\n}\n\n\nexport async function injectCaches(opts: Opts) {\n const cacheMap = getCacheMap(opts);\n const scratchDir = opts['scratch-dir'];\n const containerImage = opts['utility-image'];\n\n const builder = getBuilder(opts);\n // Inject Caches for each source-target pair\n for (const [cacheSource, cacheOptions] of Object.entries(cacheMap)) {\n await injectCache(cacheSource, cacheOptions, scratchDir, containerImage, builder);\n }\n}\n","import mri from 'mri';\nimport { getInput, warning } from '@actions/core';\n\nexport type Opts = {\n \"extract\": boolean\n \"cache-map\": string\n \"scratch-dir\": string\n \"skip-extraction\": boolean\n \"utility-image\": string\n \"builder\"?: string\n help: boolean\n /** @deprecated Use `cache-map` instead */\n \"cache-source\"?: string\n /** @deprecated Use `cache-map` instead */\n \"cache-target\"?: string\n}\n\nexport function parseOpts(args: string[]): mri.Argv {\n const opts = mri(args, {\n default: {\n \"cache-map\": getInput(\"cache-map\") || \"{}\",\n \"scratch-dir\": getInput(\"scratch-dir\") || \"scratch\",\n \"skip-extraction\": (getInput(\"skip-extraction\") || \"false\") === \"true\",\n \"extract\": process.env[`STATE_POST`] !== undefined,\n \"utility-image\": getInput(\"utility-image\") || \"ghcr.io/containerd/busybox:latest\",\n \"builder\": getInput(\"builder\") || \"default\",\n \"help\": false,\n },\n string: [\"cache-map\", \"scratch-dir\", \"cache-source\", \"cache-target\", \"utility-image\", \"builder\"],\n boolean: [\"skip-extraction\", \"help\", \"extract\"],\n alias: {\n \"help\": [\"h\"],\n },\n })\n\n if (opts[\"cache-source\"] && opts[\"cache-target\"]) {\n warning(\"The `cache-source` and `cache-target` options are deprecated. Use `cache-map` instead.\")\n\n opts[\"cache-map\"] = JSON.stringify({\n [opts[\"cache-source\"]]: opts[\"cache-target\"],\n });\n }\n\n return opts;\n}\n\nexport function help() {\n console.log(`build-cache-dance [options]\nSave 'RUN --mount=type=cache' caches on GitHub Actions or other CI platforms\n\nOptions:\n --extract Extract the cache from the docker container (extract step). Otherwise, inject the cache (main step)\n --cache-map The map of actions source paths to container destination paths or mount arguments\n --scratch-dir Where the action is stores some temporary files for its processing. Default: 'scratch'\n --skip-extraction Skip the extraction of the cache from the docker container\n --utility-image The container image to use for injecting and extracting the cache. Default: 'ghcr.io/containerd/busybox:latest'\n --builder The name of the buildx builder to use for the cache injection\n --help Show this help\n`);\n}\n\nexport type SourcePath = string\nexport type TargetPath = string\nexport type ToStringable = {\n toString(): string;\n}\nexport type CacheOptions = TargetPath | { target: TargetPath } & Record\nexport type CacheMap = Record\n\nexport function getCacheMap(opts: Opts): CacheMap {\n try {\n return JSON.parse(opts[\"cache-map\"]) as CacheMap;\n } catch (e) {\n throw new Error(`Failed to parse cache map. Expected JSON, got:\\n${opts[\"cache-map\"]}\\n${e}`);\n }\n}\n\nexport function getTargetPath(cacheOptions: CacheOptions): TargetPath {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return cacheOptions;\n } else {\n // object is provided\n if (\"target\" in cacheOptions) {\n return cacheOptions.target;\n } else {\n throw new Error(`Expected the 'target' key in the cache options, got:\\n${cacheOptions}`);\n }\n }\n}\n\nexport function getUID(cacheOptions: CacheOptions): string {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return \"\";\n } else {\n // object is provided\n if (\"uid\" in cacheOptions && cacheOptions.uid !== undefined) {\n return cacheOptions.uid.toString();\n } else {\n return \"\";\n }\n }\n}\n\nexport function getGID(cacheOptions: CacheOptions): string {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return \"\";\n } else {\n // object is provided\n if (\"gid\" in cacheOptions && cacheOptions.gid !== undefined) {\n return cacheOptions.gid.toString();\n } else {\n return \"\";\n }\n }\n}\n\n/**\n * Convert a cache options to a string that is passed to --mount=\n * @param CacheOptions The cache options to convert to a string\n */\nexport function getMountArgsString(cacheOptions: CacheOptions): string {\n if (typeof cacheOptions === \"string\") {\n // only the target path is provided\n return `type=cache,target=${cacheOptions}`;\n } else {\n // other options are provided\n const otherOptions = Object.entries(cacheOptions).map(([key, value]) => `${key}=${value}`).join(\",\");\n return `type=cache,${otherOptions}`;\n }\n}\n\nexport function getBuilder(opts: Opts): string {\n return opts[\"builder\"] == null || opts[\"builder\"] == \"\" ? \"default\" : opts[\"builder\"];\n}\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n",null,null,null,null,null,null,null,null,"import spawnPlease from 'spawn-please'\nimport cp, { type ChildProcess } from 'child_process';\n\nexport async function run(command: string, args: string[]) {\n try {\n return await spawnPlease(command, args);\n } catch (error) {\n console.error(`Error running command: ${command} ${args.join(' ')}`);\n throw error;\n }\n}\n\nexport async function runPiped([command1, args1]: [string, string[]], [command2, args2]: [string, string[]]) {\n const cp1 = cp.spawn(command1, args1, { stdio: ['inherit', 'pipe', 'inherit'] });\n const cp2 = cp.spawn(command2, args2, { stdio: ['pipe', 'inherit', 'inherit'] });\n\n cp1.stdout.pipe(cp2.stdin);\n\n await Promise.all([assertSuccess(cp1), assertSuccess(cp2)]);\n}\n\nfunction assertSuccess(cp: ChildProcess) {\n return new Promise((resolve, reject) => {\n cp.on('error', (error) => {\n reject(error);\n });\n cp.on('close', (code) => {\n if (code !== 0) {\n reject(new Error(`process exited with code ${code}`));\n }\n resolve();\n });\n });\n}\n","const spawn = require('cross-spawn')\n\n/** Spawns a child process, as long as you ask nicely.\n * \n * @param {string} command - The shell command to execute.\n * @param {string[]} [args] - An array of arguments that are given after the command.\n * @param {{ rejectOnError?: boolean, stdin?: string, stderr?: (data: string) => void, stdout?: (data: string) => void }} [options] - Options.\n * @param {any} [spawnOptions] - Options that are passed directly to child_process.spawn. Also supports stdin: string.\n * @returns {Promise<{ stdout: string, stderr: string }>}\n */\nconst spawnPlease = (command, args, options={}, spawnOptions={}) => {\n // defaults\n if (options.rejectOnError === undefined) {\n options.rejectOnError = true\n }\n\n let stdout = ''\n let stderr = ''\n const child = spawn(command, args, spawnOptions)\n\n return new Promise((resolve, reject) => {\n if (options.stdin !== undefined && options.stdin != null) {\n child.stdin.write(options.stdin)\n }\n child.stdin.end()\n\n child.stdout.on('data', data => {\n stdout += data\n if (options.stdout) options.stdout(data)\n })\n\n child.stderr.on('data', data => {\n stderr += data\n if (options.stderr) options.stderr(data)\n })\n\n if (options.rejectOnError) {\n child.addListener('error', reject)\n }\n\n child.on('close', code => {\n if (code !== 0 && options.rejectOnError) {\n reject(stderr)\n } else {\n resolve({ stdout, stderr })\n }\n })\n })\n}\n\nmodule.exports = spawnPlease\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","import fs from 'fs/promises';\nimport path from 'path';\nimport {CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath, getBuilder} from './opts.js';\nimport { run, runPiped } from './run.js';\n\nasync function extractCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string, builder: string) {\n // Prepare Timestamp for Layer Cache Busting\n const date = new Date().toISOString();\n\n await fs.mkdir(scratchDir, { recursive: true });\n await fs.writeFile(path.join(scratchDir, 'buildstamp'), date);\n\n // Prepare Dancefile to Access Caches\n const targetPath = getTargetPath(cacheOptions);\n const mountArgs = getMountArgsString(cacheOptions);\n\n const dancefileContent = `\nFROM ${containerImage}\nCOPY buildstamp buildstamp\nRUN --mount=${mountArgs} \\\n mkdir -p /var/dance-cache/ \\\n && cp -p -R ${targetPath}/. /var/dance-cache/ || true\n`;\n await fs.writeFile(path.join(scratchDir, 'Dancefile.extract'), dancefileContent);\n console.log(dancefileContent);\n\n // Extract Data into Docker Image\n await run('docker', ['buildx', 'build', '--builder', builder, '-f', path.join(scratchDir, 'Dancefile.extract'), '--tag', 'dance:extract', '--load', scratchDir]);\n\n // Create Extraction Image\n try {\n await run('docker', ['rm', '-f', 'cache-container']);\n } catch (error) {\n // Ignore error if container does not exist\n }\n await run('docker', ['create', '-ti', '--name', 'cache-container', 'dance:extract']);\n\n // Unpack Docker Image into Scratch\n await runPiped(\n ['docker', ['cp', '-L', 'cache-container:/var/dance-cache', '-']],\n ['tar', ['-H', 'posix', '-x', '-C', scratchDir]]\n );\n\n // Move Cache into Its Place\n await run('sudo', ['rm', '-rf', cacheSource]);\n await fs.rename(path.join(scratchDir, 'dance-cache'), cacheSource);\n}\n\nexport async function extractCaches(opts: Opts) {\n if (opts[\"skip-extraction\"]) {\n console.log(\"skip-extraction is set. Skipping extraction step...\");\n return;\n }\n\n const cacheMap = getCacheMap(opts);\n const scratchDir = opts['scratch-dir'];\n const containerImage = opts['utility-image'];\n const builder = getBuilder(opts);\n\n // Extract Caches for each source-target pair\n for (const [cacheSource, cacheOptions] of Object.entries(cacheMap)) {\n await extractCache(cacheSource, cacheOptions, scratchDir, containerImage, builder);\n }\n}\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../"} \ No newline at end of file diff --git a/src/extract-cache.ts b/src/extract-cache.ts index d2b938f..8dc57ec 100644 --- a/src/extract-cache.ts +++ b/src/extract-cache.ts @@ -1,9 +1,9 @@ import fs from 'fs/promises'; import path from 'path'; -import { CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath } from './opts.js'; +import {CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath, getBuilder} from './opts.js'; import { run, runPiped } from './run.js'; -async function extractCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string) { +async function extractCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string, builder: string) { // Prepare Timestamp for Layer Cache Busting const date = new Date().toISOString(); @@ -25,7 +25,7 @@ RUN --mount=${mountArgs} \ console.log(dancefileContent); // Extract Data into Docker Image - await run('docker', ['buildx', 'build', '-f', path.join(scratchDir, 'Dancefile.extract'), '--tag', 'dance:extract', '--load', scratchDir]); + await run('docker', ['buildx', 'build', '--builder', builder, '-f', path.join(scratchDir, 'Dancefile.extract'), '--tag', 'dance:extract', '--load', scratchDir]); // Create Extraction Image try { @@ -55,9 +55,10 @@ export async function extractCaches(opts: Opts) { const cacheMap = getCacheMap(opts); const scratchDir = opts['scratch-dir']; const containerImage = opts['utility-image']; + const builder = getBuilder(opts); // Extract Caches for each source-target pair for (const [cacheSource, cacheOptions] of Object.entries(cacheMap)) { - await extractCache(cacheSource, cacheOptions, scratchDir, containerImage); + await extractCache(cacheSource, cacheOptions, scratchDir, containerImage, builder); } } diff --git a/src/inject-cache.ts b/src/inject-cache.ts index 1fe09bd..ed45958 100644 --- a/src/inject-cache.ts +++ b/src/inject-cache.ts @@ -1,10 +1,10 @@ import fs from 'fs/promises'; import path from 'path'; -import { CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath, getUID, getGID } from './opts.js'; +import { CacheOptions, Opts, getCacheMap, getMountArgsString, getTargetPath, getUID, getGID, getBuilder } from './opts.js'; import { run } from './run.js'; import { notice } from '@actions/core'; -async function injectCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string) { +async function injectCache(cacheSource: string, cacheOptions: CacheOptions, scratchDir: string, containerImage: string, builder: string) { // Clean Scratch Directory await fs.rm(scratchDir, { recursive: true, force: true }); await fs.mkdir(scratchDir, { recursive: true }); @@ -39,7 +39,7 @@ RUN --mount=${mountArgs} \ console.log(dancefileContent); // Inject Data into Docker Cache - await run('docker', ['buildx', 'build', '-f', path.join(scratchDir, 'Dancefile.inject'), '--tag', 'dance:inject', cacheSource]); + await run('docker', ['buildx', 'build', '--builder', builder ,'-f', path.join(scratchDir, 'Dancefile.inject'), '--tag', 'dance:inject', cacheSource]); // Clean Directories try { @@ -56,8 +56,9 @@ export async function injectCaches(opts: Opts) { const scratchDir = opts['scratch-dir']; const containerImage = opts['utility-image']; + const builder = getBuilder(opts); // Inject Caches for each source-target pair for (const [cacheSource, cacheOptions] of Object.entries(cacheMap)) { - await injectCache(cacheSource, cacheOptions, scratchDir, containerImage); + await injectCache(cacheSource, cacheOptions, scratchDir, containerImage, builder); } } diff --git a/src/opts.ts b/src/opts.ts index b80dc93..1fadcb9 100644 --- a/src/opts.ts +++ b/src/opts.ts @@ -7,6 +7,7 @@ export type Opts = { "scratch-dir": string "skip-extraction": boolean "utility-image": string + "builder"?: string help: boolean /** @deprecated Use `cache-map` instead */ "cache-source"?: string @@ -22,9 +23,10 @@ export function parseOpts(args: string[]): mri.Argv { "skip-extraction": (getInput("skip-extraction") || "false") === "true", "extract": process.env[`STATE_POST`] !== undefined, "utility-image": getInput("utility-image") || "ghcr.io/containerd/busybox:latest", + "builder": getInput("builder") || "default", "help": false, }, - string: ["cache-map", "scratch-dir", "cache-source", "cache-target", "utility-image"], + string: ["cache-map", "scratch-dir", "cache-source", "cache-target", "utility-image", "builder"], boolean: ["skip-extraction", "help", "extract"], alias: { "help": ["h"], @@ -52,6 +54,7 @@ Options: --scratch-dir Where the action is stores some temporary files for its processing. Default: 'scratch' --skip-extraction Skip the extraction of the cache from the docker container --utility-image The container image to use for injecting and extracting the cache. Default: 'ghcr.io/containerd/busybox:latest' + --builder The name of the buildx builder to use for the cache injection --help Show this help `); } @@ -128,3 +131,7 @@ export function getMountArgsString(cacheOptions: CacheOptions): string { return `type=cache,${otherOptions}`; } } + +export function getBuilder(opts: Opts): string { + return opts["builder"] == null || opts["builder"] == "" ? "default" : opts["builder"]; +} diff --git a/tests/opts.test.ts b/tests/opts.test.ts index 27a973d..dc644cd 100644 --- a/tests/opts.test.ts +++ b/tests/opts.test.ts @@ -11,7 +11,8 @@ test('parseOpts with no arguments', () => { "extract": false, "h": false, "help": false, - "utility-image": "ghcr.io/containerd/busybox:latest" + "utility-image": "ghcr.io/containerd/busybox:latest", + "builder": "default" }) }) @@ -25,7 +26,8 @@ test('parseOpts with cache-map argument', () => { "extract": false, "h": false, "help": false, - "utility-image": "ghcr.io/containerd/busybox:latest" + "utility-image": "ghcr.io/containerd/busybox:latest", + "builder": "default" }) }) @@ -41,7 +43,8 @@ test('parseOpts with deprecated cache-source and cache-target arguments', () => "help": false, "cache-source": 'source', "cache-target": 'target', - "utility-image": "ghcr.io/containerd/busybox:latest" + "utility-image": "ghcr.io/containerd/busybox:latest", + "builder": "default" }) }) @@ -55,7 +58,23 @@ test('parseOpts with utility-image argument', () => { "extract": false, "h": false, "help": false, - "utility-image": "alpine:1" + "utility-image": "alpine:1", + "builder": "default" + }) +}) + +test('parseOpts with builder argument', () => { + const opts = parseOpts(['--builder', 'another-builder']) + expect(opts).toEqual({ + "_": [], + "cache-map": '{}', + "scratch-dir": "scratch", + "skip-extraction": false, + "extract": false, + "h": false, + "help": false, + "utility-image": "ghcr.io/containerd/busybox:latest", + "builder": "another-builder" }) }) @@ -69,7 +88,8 @@ test('parseOpts with help argument', () => { "extract": false, "h": true, "help": true, - "utility-image": "ghcr.io/containerd/busybox:latest" + "utility-image": "ghcr.io/containerd/busybox:latest", + "builder": "default" }) })