@docker/actions-toolkit 0.63.0 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/lib/buildx/imagetools.d.ts +6 -0
  2. package/lib/buildx/imagetools.js +37 -0
  3. package/lib/buildx/imagetools.js.map +1 -1
  4. package/lib/buildx/install.d.ts +4 -2
  5. package/lib/buildx/install.js +22 -17
  6. package/lib/buildx/install.js.map +1 -1
  7. package/lib/compose/install.d.ts +4 -2
  8. package/lib/compose/install.js +22 -17
  9. package/lib/compose/install.js.map +1 -1
  10. package/lib/cosign/cosign.d.ts +40 -0
  11. package/lib/cosign/cosign.js +180 -0
  12. package/lib/cosign/cosign.js.map +1 -0
  13. package/lib/cosign/dockerfile.d.ts +16 -0
  14. package/lib/cosign/dockerfile.js +64 -0
  15. package/lib/cosign/dockerfile.js.map +1 -0
  16. package/lib/cosign/install.d.ts +35 -0
  17. package/lib/cosign/install.js +273 -0
  18. package/lib/cosign/install.js.map +1 -0
  19. package/lib/docker/assets.d.ts +1 -1
  20. package/lib/docker/assets.js +22 -12
  21. package/lib/docker/assets.js.map +1 -1
  22. package/lib/docker/install.d.ts +3 -1
  23. package/lib/docker/install.js +17 -17
  24. package/lib/docker/install.js.map +1 -1
  25. package/lib/github.d.ts +3 -1
  26. package/lib/github.js +19 -1
  27. package/lib/github.js.map +1 -1
  28. package/lib/regclient/install.d.ts +6 -1
  29. package/lib/regclient/install.js +16 -14
  30. package/lib/regclient/install.js.map +1 -1
  31. package/lib/sigstore/sigstore.d.ts +69 -0
  32. package/lib/sigstore/sigstore.js +362 -0
  33. package/lib/sigstore/sigstore.js.map +1 -0
  34. package/lib/toolkit.d.ts +13 -1
  35. package/lib/toolkit.js +13 -1
  36. package/lib/toolkit.js.map +1 -1
  37. package/lib/types/buildx/buildx.d.ts +2 -1
  38. package/lib/types/buildx/imagetools.d.ts +25 -0
  39. package/lib/types/buildx/imagetools.js +18 -0
  40. package/lib/types/buildx/imagetools.js.map +1 -0
  41. package/lib/types/compose/compose.d.ts +2 -1
  42. package/lib/types/cosign/cosign.d.ts +21 -0
  43. package/lib/types/cosign/cosign.js +18 -0
  44. package/lib/types/cosign/cosign.js.map +1 -0
  45. package/lib/types/github.d.ts +6 -0
  46. package/lib/types/intoto/intoto.d.ts +4 -0
  47. package/lib/types/regclient/regclient.d.ts +2 -1
  48. package/lib/types/sigstore/sigstore.d.ts +19 -0
  49. package/lib/types/sigstore/sigstore.js +23 -0
  50. package/lib/types/sigstore/sigstore.js.map +1 -0
  51. package/lib/types/undock/undock.d.ts +2 -1
  52. package/lib/undock/install.d.ts +6 -1
  53. package/lib/undock/install.js +18 -16
  54. package/lib/undock/install.js.map +1 -1
  55. package/package.json +12 -7
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2025 actions-toolkit authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const dockerfileContent = "\n# syntax=docker/dockerfile:1\n\nARG GO_VERSION=\"1.24\"\nARG ALPINE_VERSION=\"3.22\"\n\nFROM --platform=$BUILDPLATFORM tonistiigi/xx:1.7.0 AS xx\n\nFROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder-base\nCOPY --from=xx / /\nRUN apk add --no-cache git\nENV GOTOOLCHAIN=auto\nENV CGO_ENABLED=0\nWORKDIR /src\nRUN --mount=type=cache,target=/go/pkg/mod \\\n --mount=type=bind,source=go.mod,target=go.mod \\\n --mount=type=bind,source=go.sum,target=go.sum \\\n go mod download\n\nFROM builder-base AS version\nRUN --mount=type=bind,target=. <<'EOT'\n git rev-parse HEAD 2>/dev/null || {\n echo >&2 \"Failed to get git revision, make sure --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 is set when building from Git directly\"\n exit 1\n }\n set -ex\n export PKG=sigs.k8s.io BUILDDATE=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") TREESTATE=$(if ! git diff --no-ext-diff --quiet --exit-code; then echo dirty; else echo clean; fi) VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) COMMIT=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi);\n echo \"-X ${PKG}/release-utils/version.gitVersion=${VERSION} -X ${PKG}/release-utils/version.gitCommit=${COMMIT} -X ${PKG}/release-utils/version.gitTreeState=${TREESTATE} -X ${PKG}/release-utils/version.buildDate=${BUILDDATE}\" > /tmp/.ldflags;\n echo -n \"${VERSION}\" > /tmp/.version;\nEOT\n\nFROM builder-base AS builder\nARG TARGETPLATFORM\nRUN --mount=type=bind,target=. \\\n --mount=type=cache,target=/root/.cache,id=cosign-$TARGETPLATFORM \\\n --mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \\\n --mount=type=cache,target=/go/pkg/mod <<EOT\n set -ex\n xx-go build -trimpath -ldflags \"-s -w $(cat /tmp/.ldflags)\" -o /out/cosign ./cmd/cosign\n xx-verify --static /out/cosign\nEOT\n\nFROM scratch\nCOPY --from=builder /out /\n";
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 actions-toolkit authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.dockerfileContent = void 0;
19
+ exports.dockerfileContent = `
20
+ # syntax=docker/dockerfile:1
21
+
22
+ ARG GO_VERSION="1.24"
23
+ ARG ALPINE_VERSION="3.22"
24
+
25
+ FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.7.0 AS xx
26
+
27
+ FROM --platform=$BUILDPLATFORM golang:\${GO_VERSION}-alpine\${ALPINE_VERSION} AS builder-base
28
+ COPY --from=xx / /
29
+ RUN apk add --no-cache git
30
+ ENV GOTOOLCHAIN=auto
31
+ ENV CGO_ENABLED=0
32
+ WORKDIR /src
33
+ RUN --mount=type=cache,target=/go/pkg/mod \\
34
+ --mount=type=bind,source=go.mod,target=go.mod \\
35
+ --mount=type=bind,source=go.sum,target=go.sum \\
36
+ go mod download
37
+
38
+ FROM builder-base AS version
39
+ RUN --mount=type=bind,target=. <<'EOT'
40
+ git rev-parse HEAD 2>/dev/null || {
41
+ echo >&2 "Failed to get git revision, make sure --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 is set when building from Git directly"
42
+ exit 1
43
+ }
44
+ set -ex
45
+ export PKG=sigs.k8s.io BUILDDATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") TREESTATE=$(if ! git diff --no-ext-diff --quiet --exit-code; then echo dirty; else echo clean; fi) VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) COMMIT=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi);
46
+ echo "-X \${PKG}/release-utils/version.gitVersion=\${VERSION} -X \${PKG}/release-utils/version.gitCommit=\${COMMIT} -X \${PKG}/release-utils/version.gitTreeState=\${TREESTATE} -X \${PKG}/release-utils/version.buildDate=\${BUILDDATE}" > /tmp/.ldflags;
47
+ echo -n "\${VERSION}" > /tmp/.version;
48
+ EOT
49
+
50
+ FROM builder-base AS builder
51
+ ARG TARGETPLATFORM
52
+ RUN --mount=type=bind,target=. \\
53
+ --mount=type=cache,target=/root/.cache,id=cosign-$TARGETPLATFORM \\
54
+ --mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \\
55
+ --mount=type=cache,target=/go/pkg/mod <<EOT
56
+ set -ex
57
+ xx-go build -trimpath -ldflags "-s -w $(cat /tmp/.ldflags)" -o /out/cosign ./cmd/cosign
58
+ xx-verify --static /out/cosign
59
+ EOT
60
+
61
+ FROM scratch
62
+ COPY --from=builder /out /
63
+ `;
64
+ //# sourceMappingURL=dockerfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dockerfile.js","sourceRoot":"","sources":["../../src/cosign/dockerfile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEU,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ChC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Copyright 2025 actions-toolkit authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Buildx } from '../buildx/buildx';
17
+ import { DownloadVersion } from '../types/cosign/cosign';
18
+ import { GitHubRelease } from '../types/github';
19
+ export interface InstallOpts {
20
+ githubToken?: string;
21
+ buildx?: Buildx;
22
+ }
23
+ export declare class Install {
24
+ private readonly githubToken;
25
+ private readonly buildx;
26
+ constructor(opts?: InstallOpts);
27
+ download(v: string, ghaNoCache?: boolean, skipState?: boolean): Promise<string>;
28
+ build(gitContext: string, ghaNoCache?: boolean, skipState?: boolean): Promise<string>;
29
+ install(binPath: string, dest?: string): Promise<string>;
30
+ private buildCommand;
31
+ private filename;
32
+ private vspec;
33
+ static getDownloadVersion(v: string): Promise<DownloadVersion>;
34
+ static getRelease(version: DownloadVersion, githubToken?: string): Promise<GitHubRelease>;
35
+ }
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2025 actions-toolkit authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || (function () {
34
+ var ownKeys = function(o) {
35
+ ownKeys = Object.getOwnPropertyNames || function (o) {
36
+ var ar = [];
37
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
+ return ar;
39
+ };
40
+ return ownKeys(o);
41
+ };
42
+ return function (mod) {
43
+ if (mod && mod.__esModule) return mod;
44
+ var result = {};
45
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
+ __setModuleDefault(result, mod);
47
+ return result;
48
+ };
49
+ })();
50
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
51
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52
+ return new (P || (P = Promise))(function (resolve, reject) {
53
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
54
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
55
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
56
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
57
+ });
58
+ };
59
+ var __importDefault = (this && this.__importDefault) || function (mod) {
60
+ return (mod && mod.__esModule) ? mod : { "default": mod };
61
+ };
62
+ Object.defineProperty(exports, "__esModule", { value: true });
63
+ exports.Install = void 0;
64
+ const fs_1 = __importDefault(require("fs"));
65
+ const os_1 = __importDefault(require("os"));
66
+ const path_1 = __importDefault(require("path"));
67
+ const core = __importStar(require("@actions/core"));
68
+ const tc = __importStar(require("@actions/tool-cache"));
69
+ const semver = __importStar(require("semver"));
70
+ const util = __importStar(require("util"));
71
+ const buildx_1 = require("../buildx/buildx");
72
+ const cache_1 = require("../cache");
73
+ const context_1 = require("../context");
74
+ const exec_1 = require("../exec");
75
+ const git_1 = require("../git");
76
+ const github_1 = require("../github");
77
+ const util_1 = require("../util");
78
+ const dockerfile_1 = require("./dockerfile");
79
+ class Install {
80
+ constructor(opts) {
81
+ this.githubToken = (opts === null || opts === void 0 ? void 0 : opts.githubToken) || process.env.GITHUB_TOKEN;
82
+ this.buildx = (opts === null || opts === void 0 ? void 0 : opts.buildx) || new buildx_1.Buildx();
83
+ }
84
+ download(v, ghaNoCache, skipState) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const version = yield Install.getDownloadVersion(v);
87
+ core.debug(`Install.download version: ${version.version}`);
88
+ const release = yield Install.getRelease(version, this.githubToken);
89
+ core.debug(`Install.download release tag name: ${release.tag_name}`);
90
+ const vspec = yield this.vspec(release.tag_name);
91
+ core.debug(`Install.download vspec: ${vspec}`);
92
+ const c = semver.clean(vspec) || '';
93
+ if (!semver.valid(c)) {
94
+ throw new Error(`Invalid Cosign version "${vspec}".`);
95
+ }
96
+ const installCache = new cache_1.Cache({
97
+ htcName: 'cosign-dl-bin',
98
+ htcVersion: vspec,
99
+ baseCacheDir: path_1.default.join(os_1.default.homedir(), '.bin'),
100
+ cacheFile: os_1.default.platform() == 'win32' ? 'cosign.exe' : 'cosign',
101
+ ghaNoCache: ghaNoCache
102
+ });
103
+ const cacheFoundPath = yield installCache.find();
104
+ if (cacheFoundPath) {
105
+ core.info(`Cosign binary found in ${cacheFoundPath}`);
106
+ return cacheFoundPath;
107
+ }
108
+ const downloadURL = util.format(version.downloadURL, vspec, this.filename());
109
+ core.info(`Downloading ${downloadURL}`);
110
+ const htcDownloadPath = yield tc.downloadTool(downloadURL, undefined, this.githubToken);
111
+ core.debug(`Install.download htcDownloadPath: ${htcDownloadPath}`);
112
+ const cacheSavePath = yield installCache.save(htcDownloadPath, skipState);
113
+ core.info(`Cached to ${cacheSavePath}`);
114
+ return cacheSavePath;
115
+ });
116
+ }
117
+ build(gitContext, ghaNoCache, skipState) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const vspec = yield this.vspec(gitContext);
120
+ core.debug(`Install.build vspec: ${vspec}`);
121
+ const installCache = new cache_1.Cache({
122
+ htcName: 'cosign-build-bin',
123
+ htcVersion: vspec,
124
+ baseCacheDir: path_1.default.join(os_1.default.homedir(), '.bin'),
125
+ cacheFile: os_1.default.platform() == 'win32' ? 'cosign.exe' : 'cosign',
126
+ ghaNoCache: ghaNoCache
127
+ });
128
+ const cacheFoundPath = yield installCache.find();
129
+ if (cacheFoundPath) {
130
+ core.info(`Cosign binary found in ${cacheFoundPath}`);
131
+ return cacheFoundPath;
132
+ }
133
+ const outputDir = path_1.default.join(context_1.Context.tmpDir(), 'cosign-build-cache');
134
+ const buildCmd = yield this.buildCommand(gitContext, outputDir);
135
+ const buildBinPath = yield exec_1.Exec.getExecOutput(buildCmd.command, buildCmd.args, {
136
+ ignoreReturnCode: true,
137
+ input: Buffer.from(dockerfile_1.dockerfileContent)
138
+ }).then(res => {
139
+ var _a, _b, _c;
140
+ if (res.stderr.length > 0 && res.exitCode != 0) {
141
+ throw new Error(`build failed with: ${(_c = (_b = (_a = res.stderr.match(/(.*)\s*$/)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : 'unknown error'}`);
142
+ }
143
+ return `${outputDir}/cosign`;
144
+ });
145
+ const cacheSavePath = yield installCache.save(buildBinPath, skipState);
146
+ core.info(`Cached to ${cacheSavePath}`);
147
+ return cacheSavePath;
148
+ });
149
+ }
150
+ install(binPath, dest) {
151
+ return __awaiter(this, void 0, void 0, function* () {
152
+ dest = dest || context_1.Context.tmpDir();
153
+ const binDir = path_1.default.join(dest, 'cosign-bin');
154
+ if (!fs_1.default.existsSync(binDir)) {
155
+ fs_1.default.mkdirSync(binDir, { recursive: true });
156
+ }
157
+ const binName = os_1.default.platform() == 'win32' ? 'cosign.exe' : 'cosign';
158
+ const cosignPath = path_1.default.join(binDir, binName);
159
+ fs_1.default.copyFileSync(binPath, cosignPath);
160
+ core.info('Fixing perms');
161
+ fs_1.default.chmodSync(cosignPath, '0755');
162
+ core.addPath(binDir);
163
+ core.info('Added Cosign to PATH');
164
+ core.info(`Binary path: ${cosignPath}`);
165
+ return cosignPath;
166
+ });
167
+ }
168
+ buildCommand(gitContext, outputDir) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ const buildxStandaloneFound = yield new buildx_1.Buildx({ standalone: true }).isAvailable();
171
+ const buildxPluginFound = yield new buildx_1.Buildx({ standalone: false }).isAvailable();
172
+ let buildStandalone = false;
173
+ if ((yield this.buildx.isStandalone()) && buildxStandaloneFound) {
174
+ core.debug(`Install.buildCommand: Buildx standalone found, build with it`);
175
+ buildStandalone = true;
176
+ }
177
+ else if (!(yield this.buildx.isStandalone()) && buildxPluginFound) {
178
+ core.debug(`Install.buildCommand: Buildx plugin found, build with it`);
179
+ buildStandalone = false;
180
+ }
181
+ else if (buildxStandaloneFound) {
182
+ core.debug(`Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it`);
183
+ buildStandalone = true;
184
+ }
185
+ else if (buildxPluginFound) {
186
+ core.debug(`Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it`);
187
+ buildStandalone = false;
188
+ }
189
+ else {
190
+ throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${gitContext}`);
191
+ }
192
+ const args = ['build', '--platform', 'local', '--build-arg', 'BUILDKIT_CONTEXT_KEEP_GIT_DIR=1', '--output', `type=local,dest=${outputDir}`];
193
+ if (process.env.GIT_AUTH_TOKEN) {
194
+ args.push('--secret', 'id=GIT_AUTH_TOKEN');
195
+ }
196
+ args.push('-f-', gitContext);
197
+ // prettier-ignore
198
+ return yield new buildx_1.Buildx({ standalone: buildStandalone }).getCommand(args);
199
+ });
200
+ }
201
+ filename() {
202
+ let arch;
203
+ switch (os_1.default.arch()) {
204
+ case 'x64': {
205
+ arch = 'amd64';
206
+ break;
207
+ }
208
+ case 'ppc64': {
209
+ arch = 'ppc64le';
210
+ break;
211
+ }
212
+ default: {
213
+ arch = os_1.default.arch();
214
+ break;
215
+ }
216
+ }
217
+ const platform = os_1.default.platform() == 'win32' ? 'windows' : os_1.default.platform();
218
+ const ext = os_1.default.platform() == 'win32' ? '.exe' : '';
219
+ return util.format('cosign-%s-%s%s', platform, arch, ext);
220
+ }
221
+ vspec(versionOrRef) {
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ if (!util_1.Util.isValidRef(versionOrRef)) {
224
+ const v = versionOrRef.replace(/^v+|v+$/g, '');
225
+ core.info(`Use ${v} version spec cache key for ${versionOrRef}`);
226
+ return v;
227
+ }
228
+ // eslint-disable-next-line prefer-const
229
+ let [baseURL, ref] = versionOrRef.split('#');
230
+ if (ref.length == 0) {
231
+ ref = 'master';
232
+ }
233
+ let sha;
234
+ if (ref.match(/^[0-9a-fA-F]{40}$/)) {
235
+ sha = ref;
236
+ }
237
+ else {
238
+ sha = yield git_1.Git.remoteSha(baseURL, ref, process.env.GIT_AUTH_TOKEN);
239
+ }
240
+ const [owner, repo] = baseURL.substring('https://github.com/'.length).split('/');
241
+ const key = `${owner}/${util_1.Util.trimSuffix(repo, '.git')}/${sha}`;
242
+ const hash = util_1.Util.hash(key);
243
+ core.info(`Use ${hash} version spec cache key for ${key}`);
244
+ return hash;
245
+ });
246
+ }
247
+ static getDownloadVersion(v) {
248
+ return __awaiter(this, void 0, void 0, function* () {
249
+ return {
250
+ version: v,
251
+ downloadURL: 'https://github.com/sigstore/cosign/releases/download/v%s/%s',
252
+ contentOpts: {
253
+ owner: 'docker',
254
+ repo: 'actions-toolkit',
255
+ ref: 'main',
256
+ path: '.github/cosign-releases.json'
257
+ }
258
+ };
259
+ });
260
+ }
261
+ static getRelease(version, githubToken) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const github = new github_1.GitHub({ token: githubToken });
264
+ const releases = yield github.releases('Cosign', version.contentOpts);
265
+ if (!releases[version.version]) {
266
+ throw new Error(`Cannot find Cosign release ${version.version} in releases JSON`);
267
+ }
268
+ return releases[version.version];
269
+ });
270
+ }
271
+ }
272
+ exports.Install = Install;
273
+ //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/cosign/install.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,oDAAsC;AAC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MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,KAAK,EAAE,WAAW,EAAC,CAAC,CAAC;YAChD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;YACtE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,CAAC,OAAO,mBAAmB,CAAC,CAAC;YACpF,CAAC;YACD,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;KAAA;CACF;AA9MD,0BA8MC"}
@@ -18,4 +18,4 @@ export declare const dockerServiceLogsPs1: () => string;
18
18
  export declare const limaYaml: () => string;
19
19
  export declare const setupDockerWinPs1Data = "\n[CmdletBinding()]\nparam(\n [Parameter(Mandatory = $true)]\n [string]$ToolDir,\n\n [Parameter(Mandatory = $true)]\n [string]$RunDir,\n\n [Parameter(Mandatory = $true)]\n [string]$DockerHostSocket,\n\n [Parameter(Mandatory = $false)]\n [string]$DockerHostTCP,\n\n [Parameter(Mandatory = $false)]\n [string]$DaemonConfig)\n\n$pwver = (Get-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\PowerShell\\3\\PowerShellEngine -Name 'PowerShellVersion').PowerShellVersion\nWrite-Host \"PowerShell version: $pwver\"\n\n# Create run directory\nNew-Item -ItemType Directory \"$RunDir\" -ErrorAction SilentlyContinue | Out-Null\n\n# Remove existing service\nif (Get-Service docker -ErrorAction SilentlyContinue) {\n $dockerVersion = (docker version -f \"{{.Server.Version}}\")\n Write-Host \"Current installed Docker version: $dockerVersion\"\n # stop service\n Stop-Service -Force -Name docker\n Write-Host \"Service stopped\"\n # remove service\n sc.exe delete \"docker\"\n # removes event log entry. we could use \"Remove-EventLog -LogName -Source docker\"\n # but this cmd is not available atm\n $ErrorActionPreference = \"SilentlyContinue\"\n & reg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\docker\" /f 2>&1 | Out-Null\n $ErrorActionPreference = \"Stop\"\n Write-Host \"Service removed\"\n}\n\n$env:Path = \"$ToolDir;\" + [System.Environment]::GetEnvironmentVariable(\"Path\",\"Machine\") + \";\" + [System.Environment]::GetEnvironmentVariable(\"Path\",\"User\")\nWrite-Host \"Path: $env:Path\"\n\n$env:DOCKER_HOST = $DockerHostSocket\nWrite-Host \"DOCKER_HOST: $env:DOCKER_HOST\"\n\nif ($DaemonConfig) {\n Write-Host \"Writing Docker daemon config\"\n New-Item -ItemType Directory -Force -Path \"$env:ProgramData\\Docker\\config\"\n $DaemonConfig | Out-File -FilePath \"$env:ProgramData\\Docker\\config\\daemon.json\"\n}\n\n$arguments = @(\n \"--host=$DockerHostSocket\",\n \"--data-root=$RunDir\\\\moby-root\",\n \"--exec-root=$RunDir\\\\moby-exec\",\n \"--pidfile=$RunDir\\\\docker.pid\",\n \"--register-service\"\n)\nif ($DockerHostTCP) {\n $arguments += \"--host=$DockerHostTCP\"\n}\n\nWrite-Host \"Creating service\"\nNew-Item -ItemType Directory \"$RunDir\\moby-root\" -ErrorAction SilentlyContinue | Out-Null\nNew-Item -ItemType Directory \"$RunDir\\moby-exec\" -ErrorAction SilentlyContinue | Out-Null\nStart-Process -Wait -NoNewWindow \"$ToolDir\\dockerd\" -ArgumentList $arguments\nWrite-Host \"Starting service\"\nStart-Service -Name docker\nWrite-Host \"Service started successfully!\"\n\n$tries=20\nWrite-Host \"Waiting for Docker daemon to start...\"\nWhile ($true) {\n $ErrorActionPreference = \"SilentlyContinue\"\n & \"$ToolDir\\docker\" version | Out-Null\n $ErrorActionPreference = \"Stop\"\n If ($LastExitCode -eq 0) {\n break\n }\n $tries--\n If ($tries -le 0) {\n Throw \"Failed to get a response from Docker daemon\"\n }\n Write-Host -NoNewline \".\"\n Start-Sleep -Seconds 1\n}\nWrite-Host \"Docker daemon started successfully!\"\n";
20
20
  export declare const dockerServiceLogsPs1Data = "\nGet-WinEvent -ea SilentlyContinue `\n -FilterHashtable @{ProviderName= \"docker\"; LogName = \"application\"} |\n Sort-Object @{Expression=\"TimeCreated\";Descending=$false} |\n ForEach-Object {\"$($_.TimeCreated.ToUniversalTime().ToString(\"o\")) [$($_.LevelDisplayName)] $($_.Message)\"}\n";
21
- export declare const limaYamlData = "\n# Source: https://github.com/lima-vm/lima/blob/master/templates/docker-rootful.yaml\n\n# VM type: \"qemu\" or \"vz\" (on macOS 13 and later).\n# The vmType can be specified only on creating the instance.\n# The vmType of existing instances cannot be changed.\n# Builtin default: \"qemu\"\nvmType: qemu\n\n# OS: \"Linux\".\n# Builtin default: \"Linux\"\nos: null\n\n# Arch: \"default\", \"x86_64\", \"aarch64\".\n# Builtin default: \"default\" (corresponds to the host architecture)\narch: null\n\nimages:\n{{#each customImages}}\n- location: \"{{location}}\"\n arch: \"{{arch}}\"\n digest: \"{{digest}}\"\n{{/each}}\n- location: \"https://cloud-images.ubuntu.com/releases/24.04/release-20250228/ubuntu-24.04-server-cloudimg-amd64.img\"\n arch: \"x86_64\"\n digest: \"sha256:a3aea891c930ee0c762077b963834f5e083eb8102574f1e4dfc9e6e4c1c73ac0\"\n kernel:\n location: \"https://cloud-images.ubuntu.com/releases/24.04/release-20250228/unpacked/ubuntu-24.04-server-cloudimg-amd64-vmlinuz-generic\"\n digest: \"sha256:2d9f30959f01675fd28aa1c2fe8934728e46766d04ecfad2d206823696a3f830\"\n cmdline: \"root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyAMA0 no_timer_check\"\n initrd:\n location: \"https://cloud-images.ubuntu.com/releases/24.04/release-20250228/unpacked/ubuntu-24.04-server-cloudimg-amd64-initrd-generic\"\n digest: \"sha256:231352d027aeebf0bb7dca281dfebae894c86e789c7377788d3c2c149471caa3\"\n- location: \"https://cloud-images.ubuntu.com/releases/24.04/release-20250228/ubuntu-24.04-server-cloudimg-arm64.img\"\n arch: \"aarch64\"\n digest: \"sha256:278a0e8475008673d9d3da10ae66a7b1a3dda059746b83d749eca386a5670bd4\"\n# Fallback to the latest release image.\n# Hint: run `limactl prune` to invalidate the cache\n- location: \"https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img\"\n arch: \"x86_64\"\n- location: \"https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img\"\n arch: \"aarch64\"\n\n# CPUs\n# Builtin default: min(4, host CPU cores)\ncpus: null\n\n# Memory size\n# Builtin default: min(\"4GiB\", half of host memory)\nmemory: null\n\n# Disk size\n# Builtin default: \"100GiB\"\ndisk: 60GiB\n\n# Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest\n# Builtin default: null (Mount nothing)\n# This file: Mount the home as read-only, /tmp/lima as writable\nmounts:\n- location: \"~\"\n- location: \"/tmp/lima\"\n writable: true\n\n# Mount type for above mounts, such as \"reverse-sshfs\" (from sshocker), \"9p\" (EXPERIMENTAL, from QEMU\u2019s virtio-9p-pci, aka virtfs),\n# or \"virtiofs\" (EXPERIMENTAL, needs `vmType: vz`)\n# Builtin default: \"reverse-sshfs\" (for QEMU), \"virtiofs\" (for vz)\nmountType: null\n\ncontainerd:\n system: false\n user: false\n\nprovision:\n- mode: system\n # This script defines the host.docker.internal hostname when hostResolver is disabled.\n # It is also needed for lima 0.8.2 and earlier, which does not support hostResolver.hosts.\n # Names defined in /etc/hosts inside the VM are not resolved inside containers when\n # using the hostResolver; use hostResolver.hosts instead (requires lima 0.8.3 or later).\n script: |\n #!/bin/sh\n sed -i 's/host.lima.internal.*/host.lima.internal host.docker.internal/' /etc/hosts\n- mode: system\n script: |\n #!/bin/sh\n apt-get install -f -y iptables\n- mode: system\n script: |\n #!/bin/bash\n set -eux -o pipefail\n command -v docker >/dev/null 2>&1 && exit 0\n if [ ! -e /etc/systemd/system/docker.socket.d/override.conf ]; then\n mkdir -p /etc/systemd/system/docker.socket.d\n # Alternatively we could just add the user to the \"docker\" group, but that requires restarting the user session\n cat <<-EOF >/etc/systemd/system/docker.socket.d/override.conf\n [Socket]\n SocketUser=${LIMA_CIDATA_USER}\n EOF\n fi\n if [ ! -e /etc/docker/daemon.json ]; then\n mkdir -p /etc/docker\n cat <<-EOF >/etc/docker/daemon.json\n {{stringify daemonConfig}}\n EOF\n fi\n export DEBIAN_FRONTEND=noninteractive\n if [ \"{{srcType}}\" == \"archive\" ]; then\n curl -fsSL https://get.docker.com | sh -s -- --channel {{srcArchiveChannel}} --version {{srcArchiveVersion}}\n sed -i 's|^ExecStart=.*|ExecStart=/usr/bin/dockerd -H fd://{{#if localTCPPort}} -H tcp://0.0.0.0:2375{{/if}} --containerd=/run/containerd/containerd.sock|' /usr/lib/systemd/system/docker.service\n systemctl daemon-reload\n systemctl restart docker\n systemctl status docker.socket || true\n systemctl status docker.service || true\n elif [ \"{{srcType}}\" == \"image\" ]; then\n arch=$(uname -m)\n case $arch in\n x86_64) arch=amd64;;\n aarch64) arch=arm64;;\n esac\n url=\"https://github.com/crazy-max/undock/releases/download/v0.10.0/undock_0.10.0_linux_$arch.tar.gz\"\n\n wget \"$url\" -O /tmp/undock.tar.gz\n tar -C /usr/local/bin -xvf /tmp/undock.tar.gz\n undock --version\n\n HOME=/tmp undock moby/moby-bin:{{srcImageTag}} /usr/local/bin\n\n wget https://raw.githubusercontent.com/moby/moby/{{gitCommit}}/contrib/init/systemd/docker.service -O /etc/systemd/system/docker.service\n wget https://raw.githubusercontent.com/moby/moby/{{gitCommit}}/contrib/init/systemd/docker.socket -O /etc/systemd/system/docker.socket\n\n sed -i 's|^ExecStart=.*|ExecStart=/usr/local/bin/dockerd -H fd://{{#if localTCPPort}} -H tcp://0.0.0.0:2375{{/if}}|' /etc/systemd/system/docker.service\n sed -i 's|containerd.service||' /etc/systemd/system/docker.service\n if ! getent group docker; then\n groupadd --system docker\n fi\n systemctl daemon-reload\n fail=0\n if ! systemctl enable --now docker; then\n fail=1\n fi\n systemctl status docker.socket || true\n systemctl status docker.service || true\n exit $fail\n fi\n\nprobes:\n- script: |\n #!/bin/bash\n set -eux -o pipefail\n # Don't check for docker CLI as it's not installed in the VM (only on the host)\n if ! timeout 30s bash -c \"until pgrep dockerd; do sleep 3; done\"; then\n echo >&2 \"dockerd is not running\"\n exit 1\n fi\n hint: See \"/var/log/cloud-init-output.log\". in the guest\n\nhostResolver:\n # hostResolver.hosts requires lima 0.8.3 or later. Names defined here will also\n # resolve inside containers, and not just inside the VM itself.\n hosts:\n host.docker.internal: host.lima.internal\n\nportForwards:\n- guestSocket: \"/var/run/docker.sock\"\n hostSocket: \"{{dockerSock}}\"\n{{#if localTCPPort}}\n- guestPort: 2375\n hostPort: {{localTCPPort}}\n{{/if}}\n\naudio:\n # EXPERIMENTAL\n # QEMU audiodev, e.g., \"none\", \"coreaudio\", \"pa\", \"alsa\", \"oss\".\n # VZ driver, use \"vz\" as device name\n # Choosing \"none\" will mute the audio output, and not play any sound.\n # Builtin default: \"\"\n device: none\n";
21
+ export declare const limaYamlData = "\n# Source:\n# - https://github.com/lima-vm/lima/blob/master/templates/docker-rootful.yaml\n# - https://github.com/lima-vm/lima/blob/master/templates/_images/ubuntu-lts.yaml\n# - https://github.com/lima-vm/lima/blob/master/templates/_images/ubuntu-24.04.yaml\n\n# VM type: \"qemu\" or \"vz\" (on macOS 13 and later).\n# The vmType can be specified only on creating the instance.\n# The vmType of existing instances cannot be changed.\n# Builtin default: \"qemu\"\nvmType: qemu\n\n# OS: \"Linux\".\n# Builtin default: \"Linux\"\nos: null\n\n# Arch: \"default\", \"x86_64\", \"aarch64\".\n# Builtin default: \"default\" (corresponds to the host architecture)\narch: null\n\nimages:\n{{#each customImages}}\n- location: \"{{location}}\"\n arch: \"{{arch}}\"\n digest: \"{{digest}}\"\n{{/each}}\n- location: \"https://cloud-images.ubuntu.com/releases/noble/release-20250704/ubuntu-24.04-server-cloudimg-amd64.img\"\n arch: \"x86_64\"\n digest: \"sha256:f1652d29d497fb7c623433705c9fca6525d1311b11294a0f495eed55c7639d1f\"\n kernel:\n location: \"https://cloud-images.ubuntu.com/releases/noble/release-20250704/unpacked/ubuntu-24.04-server-cloudimg-amd64-vmlinuz-generic\"\n digest: \"sha256:67cd9af083515de2101de032b49a64fc4b65778e5383df6ef21cf788a3f4688e\"\n cmdline: \"root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyAMA0 no_timer_check\"\n initrd:\n location: \"https://cloud-images.ubuntu.com/releases/noble/release-20250704/unpacked/ubuntu-24.04-server-cloudimg-amd64-initrd-generic\"\n digest: \"sha256:f257d581c44f66da2d80c7c5dc3fa598ce76ef313d6e27b368683e8030a9e8fd\"\n- location: \"https://cloud-images.ubuntu.com/releases/noble/release-20250704/ubuntu-24.04-server-cloudimg-arm64.img\"\n arch: \"aarch64\"\n digest: \"sha256:bbecbb88100ee65497927ed0da247ba15af576a8855004182cf3c87265e25d35\"\n# Fallback to the latest release image.\n# Hint: run `limactl prune` to invalidate the cache\n- location: https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img\n arch: \"x86_64\"\n- location: https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-arm64.img\n arch: \"aarch64\"\n\n# CPUs\n# Builtin default: min(4, host CPU cores)\ncpus: null\n\n# Memory size\n# Builtin default: min(\"4GiB\", half of host memory)\nmemory: null\n\n# Disk size\n# Builtin default: \"100GiB\"\ndisk: 60GiB\n\n# Expose host directories to the guest, the mount point might be accessible from all UIDs in the guest\n# Builtin default: null (Mount nothing)\n# This file: Mount the home as read-only, /tmp/lima as writable\nmounts:\n- location: \"~\"\n- location: \"/tmp/lima\"\n writable: true\n\n# Mount type for above mounts, such as \"reverse-sshfs\" (from sshocker), \"9p\" (EXPERIMENTAL, from QEMU\u2019s virtio-9p-pci, aka virtfs),\n# or \"virtiofs\" (EXPERIMENTAL, needs `vmType: vz`)\n# Builtin default: \"reverse-sshfs\" (for QEMU), \"virtiofs\" (for vz)\nmountType: null\n\ncontainerd:\n system: false\n user: false\n\nprovision:\n- mode: system\n # This script defines the host.docker.internal hostname when hostResolver is disabled.\n # It is also needed for lima 0.8.2 and earlier, which does not support hostResolver.hosts.\n # Names defined in /etc/hosts inside the VM are not resolved inside containers when\n # using the hostResolver; use hostResolver.hosts instead (requires lima 0.8.3 or later).\n script: |\n #!/bin/sh\n sed -i 's/host.lima.internal.*/host.lima.internal host.docker.internal/' /etc/hosts\n- mode: system\n script: |\n #!/bin/sh\n apt-get install -f -y iptables\n- mode: system\n script: |\n #!/bin/bash\n set -eux -o pipefail\n command -v docker >/dev/null 2>&1 && exit 0\n if [ ! -e /etc/systemd/system/docker.socket.d/override.conf ]; then\n mkdir -p /etc/systemd/system/docker.socket.d\n # Alternatively we could just add the user to the \"docker\" group, but that requires restarting the user session\n cat <<-EOF >/etc/systemd/system/docker.socket.d/override.conf\n [Socket]\n SocketUser=${LIMA_CIDATA_USER}\n EOF\n fi\n if [ ! -e /etc/docker/daemon.json ]; then\n mkdir -p /etc/docker\n cat <<-EOF >/etc/docker/daemon.json\n {{stringify daemonConfig}}\n EOF\n fi\n export DEBIAN_FRONTEND=noninteractive\n if [ \"{{srcType}}\" == \"archive\" ]; then\n curl -fsSL https://get.docker.com | sh -s -- --channel {{srcArchiveChannel}} --version {{srcArchiveVersion}}\n sed -i 's|^ExecStart=.*|ExecStart=/usr/bin/dockerd -H fd://{{#if localTCPPort}} -H tcp://0.0.0.0:2375{{/if}} --containerd=/run/containerd/containerd.sock|' /usr/lib/systemd/system/docker.service\n systemctl daemon-reload\n systemctl restart docker\n systemctl status docker.socket || true\n systemctl status docker.service || true\n elif [ \"{{srcType}}\" == \"image\" ]; then\n arch=$(uname -m)\n case $arch in\n x86_64) arch=amd64;;\n aarch64) arch=arm64;;\n esac\n url=\"https://github.com/crazy-max/undock/releases/download/v0.10.0/undock_0.10.0_linux_$arch.tar.gz\"\n\n wget \"$url\" -O /tmp/undock.tar.gz\n tar -C /usr/local/bin -xvf /tmp/undock.tar.gz\n undock --version\n\n HOME=/tmp undock moby/moby-bin:{{srcImageTag}} /usr/local/bin\n\n wget https://raw.githubusercontent.com/moby/moby/{{gitCommit}}/contrib/init/systemd/docker.service -O /etc/systemd/system/docker.service\n wget https://raw.githubusercontent.com/moby/moby/{{gitCommit}}/contrib/init/systemd/docker.socket -O /etc/systemd/system/docker.socket\n\n sed -i 's|^ExecStart=.*|ExecStart=/usr/local/bin/dockerd -H fd://{{#if localTCPPort}} -H tcp://0.0.0.0:2375{{/if}}|' /etc/systemd/system/docker.service\n sed -i 's|containerd.service||' /etc/systemd/system/docker.service\n if ! getent group docker; then\n groupadd --system docker\n fi\n systemctl daemon-reload\n fail=0\n if ! systemctl enable --now docker; then\n fail=1\n fi\n systemctl status docker.socket || true\n systemctl status docker.service || true\n exit $fail\n fi\n\nprobes:\n- script: |\n #!/bin/bash\n set -eux -o pipefail\n # Don't check for docker CLI as it's not installed in the VM (only on the host)\n if ! timeout 60s bash -c \"until pgrep dockerd; do sleep 3; done\"; then\n echo >&2 \"dockerd is not running\"\n exit 1\n fi\n hint: See \"/var/log/cloud-init-output.log\". in the guest\n\nhostResolver:\n # Don't use local system resolver\n enabled: false\n # hostResolver.hosts requires lima 0.8.3 or later. Names defined here will also\n # resolve inside containers, and not just inside the VM itself.\n hosts:\n host.docker.internal: host.lima.internal\n\n# Use custom DNS servers instead of the host's DNS settings\ndns:\n - 1.1.1.1\n - 1.0.0.1\n\nportForwards:\n- guestSocket: \"/var/run/docker.sock\"\n hostSocket: \"{{dockerSock}}\"\n{{#if localTCPPort}}\n- guestPort: 2375\n hostPort: {{localTCPPort}}\n{{/if}}\n\naudio:\n # EXPERIMENTAL\n # QEMU audiodev, e.g., \"none\", \"coreaudio\", \"pa\", \"alsa\", \"oss\".\n # VZ driver, use \"vz\" as device name\n # Choosing \"none\" will mute the audio output, and not play any sound.\n # Builtin default: \"\"\n device: none\n";
@@ -141,7 +141,10 @@ Get-WinEvent -ea SilentlyContinue \`
141
141
  ForEach-Object {"$($_.TimeCreated.ToUniversalTime().ToString("o")) [$($_.LevelDisplayName)] $($_.Message)"}
142
142
  `;
143
143
  exports.limaYamlData = `
144
- # Source: https://github.com/lima-vm/lima/blob/master/templates/docker-rootful.yaml
144
+ # Source:
145
+ # - https://github.com/lima-vm/lima/blob/master/templates/docker-rootful.yaml
146
+ # - https://github.com/lima-vm/lima/blob/master/templates/_images/ubuntu-lts.yaml
147
+ # - https://github.com/lima-vm/lima/blob/master/templates/_images/ubuntu-24.04.yaml
145
148
 
146
149
  # VM type: "qemu" or "vz" (on macOS 13 and later).
147
150
  # The vmType can be specified only on creating the instance.
@@ -163,24 +166,24 @@ images:
163
166
  arch: "{{arch}}"
164
167
  digest: "{{digest}}"
165
168
  {{/each}}
166
- - location: "https://cloud-images.ubuntu.com/releases/24.04/release-20250228/ubuntu-24.04-server-cloudimg-amd64.img"
169
+ - location: "https://cloud-images.ubuntu.com/releases/noble/release-20250704/ubuntu-24.04-server-cloudimg-amd64.img"
167
170
  arch: "x86_64"
168
- digest: "sha256:a3aea891c930ee0c762077b963834f5e083eb8102574f1e4dfc9e6e4c1c73ac0"
171
+ digest: "sha256:f1652d29d497fb7c623433705c9fca6525d1311b11294a0f495eed55c7639d1f"
169
172
  kernel:
170
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20250228/unpacked/ubuntu-24.04-server-cloudimg-amd64-vmlinuz-generic"
171
- digest: "sha256:2d9f30959f01675fd28aa1c2fe8934728e46766d04ecfad2d206823696a3f830"
173
+ location: "https://cloud-images.ubuntu.com/releases/noble/release-20250704/unpacked/ubuntu-24.04-server-cloudimg-amd64-vmlinuz-generic"
174
+ digest: "sha256:67cd9af083515de2101de032b49a64fc4b65778e5383df6ef21cf788a3f4688e"
172
175
  cmdline: "root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyAMA0 no_timer_check"
173
176
  initrd:
174
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20250228/unpacked/ubuntu-24.04-server-cloudimg-amd64-initrd-generic"
175
- digest: "sha256:231352d027aeebf0bb7dca281dfebae894c86e789c7377788d3c2c149471caa3"
176
- - location: "https://cloud-images.ubuntu.com/releases/24.04/release-20250228/ubuntu-24.04-server-cloudimg-arm64.img"
177
+ location: "https://cloud-images.ubuntu.com/releases/noble/release-20250704/unpacked/ubuntu-24.04-server-cloudimg-amd64-initrd-generic"
178
+ digest: "sha256:f257d581c44f66da2d80c7c5dc3fa598ce76ef313d6e27b368683e8030a9e8fd"
179
+ - location: "https://cloud-images.ubuntu.com/releases/noble/release-20250704/ubuntu-24.04-server-cloudimg-arm64.img"
177
180
  arch: "aarch64"
178
- digest: "sha256:278a0e8475008673d9d3da10ae66a7b1a3dda059746b83d749eca386a5670bd4"
181
+ digest: "sha256:bbecbb88100ee65497927ed0da247ba15af576a8855004182cf3c87265e25d35"
179
182
  # Fallback to the latest release image.
180
183
  # Hint: run \`limactl prune\` to invalidate the cache
181
- - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
184
+ - location: https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img
182
185
  arch: "x86_64"
183
- - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
186
+ - location: https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-arm64.img
184
187
  arch: "aarch64"
185
188
 
186
189
  # CPUs
@@ -291,18 +294,25 @@ probes:
291
294
  #!/bin/bash
292
295
  set -eux -o pipefail
293
296
  # Don't check for docker CLI as it's not installed in the VM (only on the host)
294
- if ! timeout 30s bash -c "until pgrep dockerd; do sleep 3; done"; then
297
+ if ! timeout 60s bash -c "until pgrep dockerd; do sleep 3; done"; then
295
298
  echo >&2 "dockerd is not running"
296
299
  exit 1
297
300
  fi
298
301
  hint: See "/var/log/cloud-init-output.log". in the guest
299
302
 
300
303
  hostResolver:
304
+ # Don't use local system resolver
305
+ enabled: false
301
306
  # hostResolver.hosts requires lima 0.8.3 or later. Names defined here will also
302
307
  # resolve inside containers, and not just inside the VM itself.
303
308
  hosts:
304
309
  host.docker.internal: host.lima.internal
305
310
 
311
+ # Use custom DNS servers instead of the host's DNS settings
312
+ dns:
313
+ - 1.1.1.1
314
+ - 1.0.0.1
315
+
306
316
  portForwards:
307
317
  - guestSocket: "/var/run/docker.sock"
308
318
  hostSocket: "{{dockerSock}}"
@@ -1 +1 @@
1
- {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/docker/assets.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH,4CAAoB;AACpB,wCAAmC;AAE5B,MAAM,iBAAiB,GAAG,GAAW,EAAE;IAC5C,OAAO,GAAG,CAAC,sBAAsB,EAAE,6BAAqB,CAAC,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEK,MAAM,oBAAoB,GAAG,GAAW,EAAE;IAC/C,OAAO,GAAG,CAAC,yBAAyB,EAAE,gCAAwB,CAAC,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,oBAAoB,wBAE/B;AAEK,MAAM,QAAQ,GAAG,GAAW,EAAE;IACnC,OAAO,GAAG,CAAC,WAAW,EAAE,oBAAY,CAAC,CAAC;AACxC,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB;AAEF,MAAM,GAAG,GAAG,CAAC,QAAgB,EAAE,IAAY,EAAE,IAAa,EAAU,EAAE;IACpE,MAAM,SAAS,GAAG,iBAAO,CAAC,OAAO,CAAC;QAChC,QAAQ,EAAE,uBAAuB,QAAQ,EAAE;QAC3C,MAAM,EAAE,iBAAO,CAAC,MAAM,EAAE;KACzB,CAAC,CAAC;IACH,YAAE,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAClC,IAAI,IAAI,EAAE,CAAC;QACT,YAAE,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAA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AC,CAAC;IACH,YAAE,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAClC,IAAI,IAAI,EAAE,CAAC;QACT,YAAE,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEW,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFpC,CAAC;AAEW,QAAA,wBAAwB,GAAG;;;;;CAKvC,CAAC;AAEW,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4L3B,CAAC"}
@@ -35,6 +35,7 @@ export interface InstallOpts {
35
35
  localTCPPort?: number;
36
36
  regctl?: Regctl;
37
37
  undock?: Undock;
38
+ githubToken?: string;
38
39
  }
39
40
  interface LimaImage {
40
41
  location: string;
@@ -50,6 +51,7 @@ export declare class Install {
50
51
  private readonly localTCPPort?;
51
52
  private readonly regctl;
52
53
  private readonly undock;
54
+ private readonly githubToken?;
53
55
  private _version;
54
56
  private _toolDir;
55
57
  private gitCommit;
@@ -73,7 +75,7 @@ export declare class Install {
73
75
  private static limaInstalled;
74
76
  private static qemuBin;
75
77
  private static qemuInstalled;
76
- static getRelease(version: string): Promise<GitHubRelease>;
78
+ static getRelease(version: string, githubToken?: string): Promise<GitHubRelease>;
77
79
  static limaCustomImages(): LimaImage[];
78
80
  private imageConfig;
79
81
  }