fixes for updated inputs
This commit is contained in:
parent
3697f3078d
commit
8ff608d867
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -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
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
6
index.js
6
index.js
@ -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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user