forked from waja/action-debian-package
main: use skopeo for determining image
This commit is contained in:
parent
ccc13d96dd
commit
685396f0fc
11
main.js
11
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue