@docker/github-builder-runtime 0.90.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.
- package/LICENSE +191 -0
- package/README.md +5 -0
- package/lib/buildkit/buildkit.d.ts +29 -0
- package/lib/buildkit/buildkit.js +95 -0
- package/lib/buildkit/buildkit.js.map +1 -0
- package/lib/buildkit/config.d.ts +20 -0
- package/lib/buildkit/config.js +37 -0
- package/lib/buildkit/config.js.map +1 -0
- package/lib/buildkit/git.d.ts +24 -0
- package/lib/buildkit/git.js +103 -0
- package/lib/buildkit/git.js.map +1 -0
- package/lib/buildx/bake.d.ts +64 -0
- package/lib/buildx/bake.js +387 -0
- package/lib/buildx/bake.js.map +1 -0
- package/lib/buildx/build.d.ts +63 -0
- package/lib/buildx/build.js +356 -0
- package/lib/buildx/build.js.map +1 -0
- package/lib/buildx/builder.d.ts +27 -0
- package/lib/buildx/builder.js +290 -0
- package/lib/buildx/builder.js.map +1 -0
- package/lib/buildx/buildx.d.ts +47 -0
- package/lib/buildx/buildx.js +374 -0
- package/lib/buildx/buildx.js.map +1 -0
- package/lib/buildx/history.d.ts +39 -0
- package/lib/buildx/history.js +144 -0
- package/lib/buildx/history.js.map +1 -0
- package/lib/buildx/imagetools.d.ts +47 -0
- package/lib/buildx/imagetools.js +205 -0
- package/lib/buildx/imagetools.js.map +1 -0
- package/lib/buildx/install.d.ts +47 -0
- package/lib/buildx/install.js +314 -0
- package/lib/buildx/install.js.map +1 -0
- package/lib/cache.d.ts +40 -0
- package/lib/cache.js +129 -0
- package/lib/cache.js.map +1 -0
- package/lib/compose/compose.d.ts +33 -0
- package/lib/compose/compose.js +91 -0
- package/lib/compose/compose.js.map +1 -0
- package/lib/compose/install.d.ts +34 -0
- package/lib/compose/install.js +190 -0
- package/lib/compose/install.js.map +1 -0
- package/lib/context.d.ts +22 -0
- package/lib/context.js +33 -0
- package/lib/context.js.map +1 -0
- package/lib/cosign/cosign.d.ts +40 -0
- package/lib/cosign/cosign.js +127 -0
- package/lib/cosign/cosign.js.map +1 -0
- package/lib/cosign/dockerfile.d.ts +16 -0
- package/lib/cosign/dockerfile.js +61 -0
- package/lib/cosign/dockerfile.js.map +1 -0
- package/lib/cosign/install.d.ts +45 -0
- package/lib/cosign/install.js +229 -0
- package/lib/cosign/install.js.map +1 -0
- package/lib/docker/assets.d.ts +21 -0
- package/lib/docker/assets.js +346 -0
- package/lib/docker/assets.js.map +1 -0
- package/lib/docker/docker.d.ts +35 -0
- package/lib/docker/docker.js +199 -0
- package/lib/docker/docker.js.map +1 -0
- package/lib/docker/install.d.ts +85 -0
- package/lib/docker/install.js +726 -0
- package/lib/docker/install.js.map +1 -0
- package/lib/dockerhub.d.ts +33 -0
- package/lib/dockerhub.js +111 -0
- package/lib/dockerhub.js.map +1 -0
- package/lib/exec.d.ts +20 -0
- package/lib/exec.js +28 -0
- package/lib/exec.js.map +1 -0
- package/lib/git.d.ts +33 -0
- package/lib/git.js +185 -0
- package/lib/git.js.map +1 -0
- package/lib/github/artifact.d.ts +19 -0
- package/lib/github/artifact.js +49 -0
- package/lib/github/artifact.js.map +1 -0
- package/lib/github/github.d.ts +39 -0
- package/lib/github/github.js +135 -0
- package/lib/github/github.js.map +1 -0
- package/lib/github/summary.d.ts +20 -0
- package/lib/github/summary.js +166 -0
- package/lib/github/summary.js.map +1 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.js +48 -0
- package/lib/index.js.map +1 -0
- package/lib/oci/oci.d.ts +11 -0
- package/lib/oci/oci.js +199 -0
- package/lib/oci/oci.js.map +1 -0
- package/lib/regclient/install.d.ts +30 -0
- package/lib/regclient/install.js +136 -0
- package/lib/regclient/install.js.map +1 -0
- package/lib/regclient/regctl.d.ts +39 -0
- package/lib/regclient/regctl.js +102 -0
- package/lib/regclient/regctl.js.map +1 -0
- package/lib/sigstore/sigstore.d.ts +41 -0
- package/lib/sigstore/sigstore.js +461 -0
- package/lib/sigstore/sigstore.js.map +1 -0
- package/lib/toolkit.d.ts +57 -0
- package/lib/toolkit.js +68 -0
- package/lib/toolkit.js.map +1 -0
- package/lib/types/buildkit/buildkit.d.ts +16 -0
- package/lib/types/buildkit/buildkit.js +18 -0
- package/lib/types/buildkit/buildkit.js.map +1 -0
- package/lib/types/buildkit/client.d.ts +61 -0
- package/lib/types/buildkit/client.js +17 -0
- package/lib/types/buildkit/client.js.map +1 -0
- package/lib/types/buildkit/control.d.ts +88 -0
- package/lib/types/buildkit/control.js +17 -0
- package/lib/types/buildkit/control.js.map +1 -0
- package/lib/types/buildkit/git.d.ts +40 -0
- package/lib/types/buildkit/git.js +17 -0
- package/lib/types/buildkit/git.js.map +1 -0
- package/lib/types/buildkit/ops.d.ts +60 -0
- package/lib/types/buildkit/ops.js +17 -0
- package/lib/types/buildkit/ops.js.map +1 -0
- package/lib/types/buildkit/rpc.d.ts +24 -0
- package/lib/types/buildkit/rpc.js +17 -0
- package/lib/types/buildkit/rpc.js.map +1 -0
- package/lib/types/buildx/bake.d.ts +70 -0
- package/lib/types/buildx/bake.js +17 -0
- package/lib/types/buildx/bake.js.map +1 -0
- package/lib/types/buildx/build.d.ts +19 -0
- package/lib/types/buildx/build.js +17 -0
- package/lib/types/buildx/build.js.map +1 -0
- package/lib/types/buildx/builder.d.ts +52 -0
- package/lib/types/buildx/builder.js +17 -0
- package/lib/types/buildx/builder.js.map +1 -0
- package/lib/types/buildx/buildx.d.ts +42 -0
- package/lib/types/buildx/buildx.js +17 -0
- package/lib/types/buildx/buildx.js.map +1 -0
- package/lib/types/buildx/history.d.ts +111 -0
- package/lib/types/buildx/history.js +17 -0
- package/lib/types/buildx/history.js.map +1 -0
- package/lib/types/buildx/imagetools.d.ts +52 -0
- package/lib/types/buildx/imagetools.js +17 -0
- package/lib/types/buildx/imagetools.js.map +1 -0
- package/lib/types/compose/compose.d.ts +22 -0
- package/lib/types/compose/compose.js +17 -0
- package/lib/types/compose/compose.js.map +1 -0
- package/lib/types/cosign/cosign.d.ts +21 -0
- package/lib/types/cosign/cosign.js +17 -0
- package/lib/types/cosign/cosign.js.map +1 -0
- package/lib/types/docker/docker.d.ts +82 -0
- package/lib/types/docker/docker.js +17 -0
- package/lib/types/docker/docker.js.map +1 -0
- package/lib/types/docker/mediatype.d.ts +18 -0
- package/lib/types/docker/mediatype.js +19 -0
- package/lib/types/docker/mediatype.js.map +1 -0
- package/lib/types/dockerhub.d.ts +104 -0
- package/lib/types/dockerhub.js +17 -0
- package/lib/types/dockerhub.js.map +1 -0
- package/lib/types/github/artifact.d.ts +26 -0
- package/lib/types/github/artifact.js +17 -0
- package/lib/types/github/artifact.js.map +1 -0
- package/lib/types/github/github.d.ts +43 -0
- package/lib/types/github/github.js +17 -0
- package/lib/types/github/github.js.map +1 -0
- package/lib/types/github/summary.d.ts +29 -0
- package/lib/types/github/summary.js +17 -0
- package/lib/types/github/summary.js.map +1 -0
- package/lib/types/intoto/intoto.d.ts +21 -0
- package/lib/types/intoto/intoto.js +19 -0
- package/lib/types/intoto/intoto.js.map +1 -0
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.d.ts +55 -0
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.js +18 -0
- package/lib/types/intoto/slsa_provenance/v0.2/provenance.js.map +1 -0
- package/lib/types/oci/config.d.ts +47 -0
- package/lib/types/oci/config.js +17 -0
- package/lib/types/oci/config.js.map +1 -0
- package/lib/types/oci/descriptor.d.ts +34 -0
- package/lib/types/oci/descriptor.js +23 -0
- package/lib/types/oci/descriptor.js.map +1 -0
- package/lib/types/oci/digest.d.ts +16 -0
- package/lib/types/oci/digest.js +17 -0
- package/lib/types/oci/digest.js.map +1 -0
- package/lib/types/oci/index.d.ts +24 -0
- package/lib/types/oci/index.js +17 -0
- package/lib/types/oci/index.js.map +1 -0
- package/lib/types/oci/layout.d.ts +22 -0
- package/lib/types/oci/layout.js +20 -0
- package/lib/types/oci/layout.js.map +1 -0
- package/lib/types/oci/manifest.d.ts +25 -0
- package/lib/types/oci/manifest.js +17 -0
- package/lib/types/oci/manifest.js.map +1 -0
- package/lib/types/oci/mediatype.d.ts +21 -0
- package/lib/types/oci/mediatype.js +22 -0
- package/lib/types/oci/mediatype.js.map +1 -0
- package/lib/types/oci/oci.d.ts +32 -0
- package/lib/types/oci/oci.js +17 -0
- package/lib/types/oci/oci.js.map +1 -0
- package/lib/types/oci/versioned.d.ts +18 -0
- package/lib/types/oci/versioned.js +17 -0
- package/lib/types/oci/versioned.js.map +1 -0
- package/lib/types/regclient/regclient.d.ts +21 -0
- package/lib/types/regclient/regclient.js +17 -0
- package/lib/types/regclient/regclient.js.map +1 -0
- package/lib/types/sigstore/sigstore.d.ts +80 -0
- package/lib/types/sigstore/sigstore.js +20 -0
- package/lib/types/sigstore/sigstore.js.map +1 -0
- package/lib/types/undock/undock.d.ts +21 -0
- package/lib/types/undock/undock.js +17 -0
- package/lib/types/undock/undock.js.map +1 -0
- package/lib/undock/install.d.ts +30 -0
- package/lib/undock/install.js +146 -0
- package/lib/undock/install.js.map +1 -0
- package/lib/undock/undock.d.ts +42 -0
- package/lib/undock/undock.js +121 -0
- package/lib/undock/undock.js.map +1 -0
- package/lib/util.d.ts +49 -0
- package/lib/util.js +218 -0
- package/lib/util.js.map +1 -0
- package/npm-shrinkwrap.json +2858 -0
- package/package.json +57 -0
|
@@ -0,0 +1,30 @@
|
|
|
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 { GitHubRelease } from '../types/github/github.js';
|
|
17
|
+
import { DownloadVersion } from '../types/regclient/regclient.js';
|
|
18
|
+
export interface InstallOpts {
|
|
19
|
+
githubToken?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class Install {
|
|
22
|
+
private readonly githubToken;
|
|
23
|
+
constructor(opts?: InstallOpts);
|
|
24
|
+
download(v: string, ghaNoCache?: boolean): Promise<string>;
|
|
25
|
+
install(binPath: string, dest?: string): Promise<string>;
|
|
26
|
+
private filename;
|
|
27
|
+
private vspec;
|
|
28
|
+
static getDownloadVersion(v: string): Promise<DownloadVersion>;
|
|
29
|
+
static getRelease(version: DownloadVersion, githubToken?: string): Promise<GitHubRelease>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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 fs from 'fs';
|
|
17
|
+
import os from 'os';
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import * as core from '@actions/core';
|
|
20
|
+
import * as tc from '@actions/tool-cache';
|
|
21
|
+
import * as semver from 'semver';
|
|
22
|
+
import * as util from 'util';
|
|
23
|
+
import { Cache } from '../cache.js';
|
|
24
|
+
import { Context } from '../context.js';
|
|
25
|
+
import { GitHub } from '../github/github.js';
|
|
26
|
+
export class Install {
|
|
27
|
+
githubToken;
|
|
28
|
+
constructor(opts) {
|
|
29
|
+
this.githubToken = opts?.githubToken || process.env.GITHUB_TOKEN;
|
|
30
|
+
}
|
|
31
|
+
/*
|
|
32
|
+
* Download regclient binary from GitHub release
|
|
33
|
+
* @param v: version semver version or latest
|
|
34
|
+
* @param ghaNoCache: disable binary caching in GitHub Actions cache backend
|
|
35
|
+
* @returns path to the regclient binary
|
|
36
|
+
*/
|
|
37
|
+
async download(v, ghaNoCache) {
|
|
38
|
+
const version = await Install.getDownloadVersion(v);
|
|
39
|
+
core.debug(`Install.download version: ${version.version}`);
|
|
40
|
+
const release = await Install.getRelease(version, this.githubToken);
|
|
41
|
+
core.debug(`Install.download release tag name: ${release.tag_name}`);
|
|
42
|
+
const vspec = await this.vspec(release.tag_name);
|
|
43
|
+
core.debug(`Install.download vspec: ${vspec}`);
|
|
44
|
+
const c = semver.clean(vspec) || '';
|
|
45
|
+
if (!semver.valid(c)) {
|
|
46
|
+
throw new Error(`Invalid regclient version "${vspec}".`);
|
|
47
|
+
}
|
|
48
|
+
const installCache = new Cache({
|
|
49
|
+
htcName: 'regctl-dl-bin',
|
|
50
|
+
htcVersion: vspec,
|
|
51
|
+
baseCacheDir: path.join(os.homedir(), '.bin'),
|
|
52
|
+
cacheFile: os.platform() == 'win32' ? 'regctl.exe' : 'regctl',
|
|
53
|
+
ghaNoCache: ghaNoCache
|
|
54
|
+
});
|
|
55
|
+
const cacheFoundPath = await installCache.find();
|
|
56
|
+
if (cacheFoundPath) {
|
|
57
|
+
core.info(`regctl binary found in ${cacheFoundPath}`);
|
|
58
|
+
return cacheFoundPath;
|
|
59
|
+
}
|
|
60
|
+
const downloadURL = util.format(version.downloadURL, vspec, this.filename());
|
|
61
|
+
core.info(`Downloading ${downloadURL}`);
|
|
62
|
+
const htcDownloadPath = await tc.downloadTool(downloadURL, undefined, this.githubToken);
|
|
63
|
+
core.debug(`Install.download htcDownloadPath: ${htcDownloadPath}`);
|
|
64
|
+
const cacheSavePath = await installCache.save(htcDownloadPath);
|
|
65
|
+
core.info(`Cached to ${cacheSavePath}`);
|
|
66
|
+
return cacheSavePath;
|
|
67
|
+
}
|
|
68
|
+
async install(binPath, dest) {
|
|
69
|
+
dest = dest || Context.tmpDir();
|
|
70
|
+
const binDir = path.join(dest, 'regctl-bin');
|
|
71
|
+
if (!fs.existsSync(binDir)) {
|
|
72
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
73
|
+
}
|
|
74
|
+
const binName = os.platform() == 'win32' ? 'regctl.exe' : 'regctl';
|
|
75
|
+
const regctlPath = path.join(binDir, binName);
|
|
76
|
+
fs.copyFileSync(binPath, regctlPath);
|
|
77
|
+
core.info('Fixing perms');
|
|
78
|
+
fs.chmodSync(regctlPath, '0755');
|
|
79
|
+
core.addPath(binDir);
|
|
80
|
+
core.info('Added regctl to PATH');
|
|
81
|
+
core.info(`Binary path: ${regctlPath}`);
|
|
82
|
+
return regctlPath;
|
|
83
|
+
}
|
|
84
|
+
filename() {
|
|
85
|
+
let arch;
|
|
86
|
+
switch (os.arch()) {
|
|
87
|
+
case 'x64': {
|
|
88
|
+
arch = 'amd64';
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case 'ppc64': {
|
|
92
|
+
arch = 'ppc64le';
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'arm': {
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
+
const arm_version = process.config.variables.arm_version;
|
|
98
|
+
arch = arm_version ? 'armv' + arm_version : 'arm';
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
default: {
|
|
102
|
+
arch = os.arch();
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const platform = os.platform() == 'win32' ? 'windows' : os.platform();
|
|
107
|
+
const ext = os.platform() == 'win32' ? '.exe' : '';
|
|
108
|
+
return util.format('regctl-%s-%s%s', platform, arch, ext);
|
|
109
|
+
}
|
|
110
|
+
async vspec(version) {
|
|
111
|
+
const v = version.replace(/^v+|v+$/g, '');
|
|
112
|
+
core.info(`Use ${v} version spec cache key for ${version}`);
|
|
113
|
+
return v;
|
|
114
|
+
}
|
|
115
|
+
static async getDownloadVersion(v) {
|
|
116
|
+
return {
|
|
117
|
+
version: v,
|
|
118
|
+
downloadURL: 'https://github.com/regclient/regclient/releases/download/v%s/%s',
|
|
119
|
+
contentOpts: {
|
|
120
|
+
owner: 'docker',
|
|
121
|
+
repo: 'actions-toolkit',
|
|
122
|
+
ref: 'main',
|
|
123
|
+
path: '.github/regclient-releases.json'
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
static async getRelease(version, githubToken) {
|
|
128
|
+
const github = new GitHub({ token: githubToken });
|
|
129
|
+
const releases = await github.releases('regclient', version.contentOpts);
|
|
130
|
+
if (!releases[version.version]) {
|
|
131
|
+
throw new Error(`Cannot find regclient release ${version.version} in releases JSON`);
|
|
132
|
+
}
|
|
133
|
+
return releases[version.version];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/regclient/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;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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 { Manifest } from '../types/oci/manifest.js';
|
|
17
|
+
export interface RegctlOpts {
|
|
18
|
+
binPath?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RegctlBlobGetOpts {
|
|
21
|
+
repository: string;
|
|
22
|
+
digest: string;
|
|
23
|
+
}
|
|
24
|
+
export interface RegctlManifestGetOpts {
|
|
25
|
+
image: string;
|
|
26
|
+
platform?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class Regctl {
|
|
29
|
+
private readonly binPath;
|
|
30
|
+
private _version;
|
|
31
|
+
private _versionOnce;
|
|
32
|
+
constructor(opts?: RegctlOpts);
|
|
33
|
+
blobGet(opts: RegctlBlobGetOpts): Promise<any>;
|
|
34
|
+
manifestGet(opts: RegctlManifestGetOpts): Promise<Manifest>;
|
|
35
|
+
isAvailable(): Promise<boolean>;
|
|
36
|
+
version(): Promise<string>;
|
|
37
|
+
printVersion(): Promise<void>;
|
|
38
|
+
versionSatisfies(range: string, version?: string): Promise<boolean>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 * as core from '@actions/core';
|
|
17
|
+
import * as semver from 'semver';
|
|
18
|
+
import { Exec } from '../exec.js';
|
|
19
|
+
export class Regctl {
|
|
20
|
+
binPath;
|
|
21
|
+
_version;
|
|
22
|
+
_versionOnce;
|
|
23
|
+
constructor(opts) {
|
|
24
|
+
this.binPath = opts?.binPath || 'regctl';
|
|
25
|
+
this._version = '';
|
|
26
|
+
this._versionOnce = false;
|
|
27
|
+
}
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
async blobGet(opts) {
|
|
30
|
+
return await Exec.getExecOutput(this.binPath, ['blob', 'get', opts.repository, opts.digest], {
|
|
31
|
+
ignoreReturnCode: true,
|
|
32
|
+
silent: true
|
|
33
|
+
}).then(res => {
|
|
34
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
35
|
+
throw new Error(res.stderr.trim());
|
|
36
|
+
}
|
|
37
|
+
return res.stdout;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async manifestGet(opts) {
|
|
41
|
+
return await Exec.getExecOutput(this.binPath, ['manifest', 'get', opts.image, `--platform=${opts.platform ?? 'local'}`, `--format={{json .}}`], {
|
|
42
|
+
ignoreReturnCode: true,
|
|
43
|
+
silent: true
|
|
44
|
+
}).then(res => {
|
|
45
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
46
|
+
throw new Error(res.stderr.trim());
|
|
47
|
+
}
|
|
48
|
+
return JSON.parse(res.stdout.trim());
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async isAvailable() {
|
|
52
|
+
const ok = await Exec.getExecOutput(this.binPath, [], {
|
|
53
|
+
ignoreReturnCode: true,
|
|
54
|
+
silent: true
|
|
55
|
+
})
|
|
56
|
+
.then(res => {
|
|
57
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
58
|
+
core.debug(`Regctl.isAvailable cmd err: ${res.stderr.trim()}`);
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return res.exitCode == 0;
|
|
62
|
+
})
|
|
63
|
+
.catch(error => {
|
|
64
|
+
core.debug(`Regctl.isAvailable error: ${error}`);
|
|
65
|
+
return false;
|
|
66
|
+
});
|
|
67
|
+
core.debug(`Regctl.isAvailable: ${ok}`);
|
|
68
|
+
return ok;
|
|
69
|
+
}
|
|
70
|
+
async version() {
|
|
71
|
+
if (this._versionOnce) {
|
|
72
|
+
return this._version;
|
|
73
|
+
}
|
|
74
|
+
this._versionOnce = true;
|
|
75
|
+
this._version = await Exec.getExecOutput(this.binPath, ['version', '--format', '{{.VCSTag}}'], {
|
|
76
|
+
ignoreReturnCode: true,
|
|
77
|
+
silent: true
|
|
78
|
+
}).then(res => {
|
|
79
|
+
if (res.stderr.length > 0 && res.exitCode != 0) {
|
|
80
|
+
throw new Error(res.stderr.trim());
|
|
81
|
+
}
|
|
82
|
+
return res.stdout.trim();
|
|
83
|
+
});
|
|
84
|
+
return this._version;
|
|
85
|
+
}
|
|
86
|
+
async printVersion() {
|
|
87
|
+
await Exec.exec(this.binPath, ['version'], {
|
|
88
|
+
failOnStdErr: false
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async versionSatisfies(range, version) {
|
|
92
|
+
const ver = version ?? (await this.version());
|
|
93
|
+
if (!ver) {
|
|
94
|
+
core.debug(`Regctl.versionSatisfies false: undefined version`);
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
const res = semver.satisfies(ver, range) || /^[0-9a-f]{7}$/.exec(ver) !== null;
|
|
98
|
+
core.debug(`Regctl.versionSatisfies ${ver} statisfies ${range}: ${res}`);
|
|
99
|
+
return res;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=regctl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regctl.js","sourceRoot":"","sources":["../../src/regclient/regctl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAkBhC,MAAM,OAAO,MAAM;IACA,OAAO,CAAS;IACzB,QAAQ,CAAS;IACjB,YAAY,CAAU;IAE9B,YAAY,IAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,OAAO,IAAI,QAAQ,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,8DAA8D;IACvD,KAAK,CAAC,OAAO,CAAC,IAAuB;QAC1C,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE;YAC3F,gBAAgB,EAAE,IAAI;YACtB,MAAM,EAAE,IAAI;SACb,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YACrC,CAAC;YACD,OAAO,GAAG,CAAC,MAAM,CAAC;QACpB,CAAC,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C;YACT,IAAI,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;YAC/D,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;QAC/E,IAAI,CAAC,KAAK,CAAC,2BAA2B,GAAG,eAAe,KAAK,KAAK,GAAG,EAAE,CAAC,CAAC;QACzE,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { Cosign } from '../cosign/cosign.js';
|
|
17
|
+
import { ImageTools } from '../buildx/imagetools.js';
|
|
18
|
+
import { SignAttestationManifestsOpts, SignAttestationManifestsResult, SignProvenanceBlobsOpts, SignProvenanceBlobsResult, VerifyArtifactOpts, VerifyArtifactResult, VerifySignedArtifactsOpts, VerifySignedArtifactsResult, VerifySignedManifestsOpts, VerifySignedManifestsResult } from '../types/sigstore/sigstore.js';
|
|
19
|
+
export interface SigstoreOpts {
|
|
20
|
+
cosign?: Cosign;
|
|
21
|
+
imageTools?: ImageTools;
|
|
22
|
+
}
|
|
23
|
+
export declare class Sigstore {
|
|
24
|
+
private readonly cosign;
|
|
25
|
+
private readonly imageTools;
|
|
26
|
+
constructor(opts?: SigstoreOpts);
|
|
27
|
+
signAttestationManifests(opts: SignAttestationManifestsOpts): Promise<Record<string, SignAttestationManifestsResult>>;
|
|
28
|
+
verifySignedManifests(signedManifestsResult: Record<string, SignAttestationManifestsResult>, opts: VerifySignedManifestsOpts): Promise<Record<string, VerifySignedManifestsResult>>;
|
|
29
|
+
verifyImageAttestations(image: string, opts: VerifySignedManifestsOpts): Promise<Record<string, VerifySignedManifestsResult>>;
|
|
30
|
+
verifyImageAttestation(attestationRef: string, opts: VerifySignedManifestsOpts): Promise<VerifySignedManifestsResult>;
|
|
31
|
+
signProvenanceBlobs(opts: SignProvenanceBlobsOpts): Promise<Record<string, SignProvenanceBlobsResult>>;
|
|
32
|
+
verifySignedArtifacts(signedArtifactsResult: Record<string, SignProvenanceBlobsResult>, opts: VerifySignedArtifactsOpts): Promise<Record<string, VerifySignedArtifactsResult>>;
|
|
33
|
+
verifyArtifact(artifactPath: string, bundlePath: string, opts?: VerifyArtifactOpts): Promise<VerifyArtifactResult>;
|
|
34
|
+
private signingEndpoints;
|
|
35
|
+
private static noTransparencyLog;
|
|
36
|
+
private static getProvenanceBlobs;
|
|
37
|
+
private static getProvenanceSubjects;
|
|
38
|
+
private static signPayload;
|
|
39
|
+
private static parseBundle;
|
|
40
|
+
private static parseCertificate;
|
|
41
|
+
}
|