Bump toolkit to 0.0.7

This commit is contained in:
boxofyellow
2024-03-08 05:45:40 -08:00
parent cbce22dbfd
commit 761ae0d82e
3 changed files with 12 additions and 15 deletions
Generated Vendored
+7 -10
View File
@@ -66390,8 +66390,8 @@ async function publishOCIArtifact(token, registry, repository, semver, zipFile,
return uploadLayer(layer, tarFile, registry, checkBlobEndpoint, uploadBlobEndpoint, b64Token);
case 'application/vnd.github.actions.package.layer.v1.zip':
return uploadLayer(layer, zipFile, registry, checkBlobEndpoint, uploadBlobEndpoint, b64Token);
case 'application/vnd.github.actions.package.config.v1+json':
return uploadLayer(layer, { path: '', size: 0, sha256: layer.digest }, registry, checkBlobEndpoint, uploadBlobEndpoint, b64Token);
case 'application/vnd.oci.empty.v1+json':
return uploadLayer(layer, { path: '', size: 2, sha256: layer.digest }, registry, checkBlobEndpoint, uploadBlobEndpoint, b64Token);
default:
throw new Error(`Unknown media type ${layer.mediaType}`);
}
@@ -66439,8 +66439,8 @@ async function uploadLayer(layer, file, registryURL, checkBlobEndpoint, uploadBl
const uploadBlobUrl = new URL(pathname, registryURL).toString();
// TODO: must we handle the empty config layer? Maybe we can just skip calling this at all
let data;
if (file.size === 0) {
data = Buffer.alloc(0);
if (layer.mediaType === 'application/vnd.oci.empty.v1+json') {
data = Buffer.from('{}');
}
else {
data = fsHelper.readFileContents(file.path);
@@ -66530,12 +66530,9 @@ function createActionPackageManifest(tarFile, zipFile, repository, repoId, owner
exports.createActionPackageManifest = createActionPackageManifest;
function createConfigLayer() {
const configLayer = {
mediaType: 'application/vnd.github.actions.package.config.v1+json',
size: 0,
digest: 'sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
annotations: {
'org.opencontainers.image.title': 'config.json'
}
mediaType: 'application/vnd.oci.empty.v1+json',
size: 2,
digest: 'sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a'
};
return configLayer;
}
+4 -4
View File
@@ -13,7 +13,7 @@
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@immutable-actions/toolkit": "^0.0.3",
"@immutable-actions/toolkit": "^0.0.7",
"@types/fs-extra": "^11.0.4",
"archiver": "^6.0.1",
"fs-extra": "^11.2.0",
@@ -892,9 +892,9 @@
"dev": true
},
"node_modules/@immutable-actions/toolkit": {
"version": "0.0.3",
"resolved": "https://npm.pkg.github.com/download/@immutable-actions/toolkit/0.0.3/44fea07f66485caeca02ccde09c83cfb1b306c3f",
"integrity": "sha512-/lejtfrp4lraAoXGi3VrmE+1bD/evG8h2pm0plRvpyK5PisDxdrkrzGGcIKAgbNJVGgoKmK9dbmgUllTCS4Ltw==",
"version": "0.0.7",
"resolved": "https://npm.pkg.github.com/download/@immutable-actions/toolkit/0.0.7/3f93d28484aedf0b46d76f059553f82a30b49bdb",
"integrity": "sha512-4Eaj9ytgv674wUHeVAQVty+NF/8X7MxeVukZ9G7EggDR6cTmeJG3SHQsegjDtD5Tx5b4yqaheSAgVJlj9YgHtQ==",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
+1 -1
View File
@@ -71,7 +71,7 @@
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@immutable-actions/toolkit": "^0.0.3",
"@immutable-actions/toolkit": "^0.0.7",
"@types/fs-extra": "^11.0.4",
"archiver": "^6.0.1",
"fs-extra": "^11.2.0",