From 685396f0fcc42b88d99e7934ea179e1c65847149 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 27 Oct 2022 09:58:09 +0200 Subject: [PATCH] main: use skopeo for determining image --- main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 073a712..8322726 100644 --- a/main.js +++ b/main.js @@ -19,9 +19,16 @@ function getImageTag(imageName, distribution) { async function getImageName(distribution) { const tag = getImageTag("", distribution) for (const image of ["debian", "ubuntu"]) { - const tags = await hub.queryTags({ user: "library", name: image }) - if (tags.find(t => t.name == tag)) { + try { + await exec.exec("skopeo", [ + "inspect", + "--no-tags", + "--no-creds", + `docker://docker.io/library/${image}:${tag}` + ]) return image + } catch { + continue } } }