fixes for updated inputs

This commit is contained in:
James Brumond 2023-08-18 22:05:22 -07:00
parent 3697f3078d
commit 8ff608d867
Signed by: james
GPG Key ID: E8F2FC44BAA3357A
3 changed files with 7 additions and 7 deletions

6
dist/index.js vendored
View File

@ -2884,7 +2884,7 @@ async function main() {
};
input.registry_url = `http${input.insecure ? '' : 's'}://${input.registry}`;
console.log('Tagging %s/%s:%s with new tags', input.registry, input.image, input.old_tag, input.new_tags);
console.log('Tagging %s/%s:%s with new tags', input.registry, input.manifest.image, input.manifest.tag, input.new_tags);
const manifest = await get_manifest(input);
@ -2917,7 +2917,7 @@ function parse_tags(tags) {
}
async function get_manifest(input) {
const path = `/v2/${input.image}/manifests/${input.old_tag}`;
const path = `/v2/${input.manifest.image}/manifests/${input.manifest.tag}`;
let { status, headers, body } = await http_req('GET', input.registry_url + path, {
accept: manifest_media_type,
});
@ -2940,7 +2940,7 @@ async function get_manifest(input) {
}
async function put_manifest(new_tag, manifest, input) {
const path = `/v2/${input.image}/manifests/${new_tag}`;
const path = `/v2/${input.manifest.image}/manifests/${new_tag}`;
const req_headers = {
'content-type': manifest_media_type,
};

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@ async function main() {
};
input.registry_url = `http${input.insecure ? '' : 's'}://${input.registry}`;
console.log('Tagging %s/%s:%s with new tags', input.registry, input.image, input.old_tag, input.new_tags);
console.log('Tagging %s/%s:%s with new tags', input.registry, input.manifest.image, input.manifest.tag, input.new_tags);
const manifest = await get_manifest(input);
@ -56,7 +56,7 @@ function parse_tags(tags) {
}
async function get_manifest(input) {
const path = `/v2/${input.image}/manifests/${input.old_tag}`;
const path = `/v2/${input.manifest.image}/manifests/${input.manifest.tag}`;
let { status, headers, body } = await http_req('GET', input.registry_url + path, {
accept: manifest_media_type,
});
@ -79,7 +79,7 @@ async function get_manifest(input) {
}
async function put_manifest(new_tag, manifest, input) {
const path = `/v2/${input.image}/manifests/${new_tag}`;
const path = `/v2/${input.manifest.image}/manifests/${new_tag}`;
const req_headers = {
'content-type': manifest_media_type,
};