diff --git a/dist/index.js b/dist/index.js index 4b1191c..a82f5f8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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; } diff --git a/package-lock.json b/package-lock.json index 3ab3c4a..64fca52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 050b556..682b55e 100644 --- a/package.json +++ b/package.json @@ -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",