mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-02-22 10:11:21 +01:00
Fix multiple tags push bug (#59)
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
42e9b87b01
commit
61659a2275
3 changed files with 8 additions and 8 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
12
src/index.ts
12
src/index.ts
|
@ -189,7 +189,7 @@ async function run(): Promise<void> {
|
|||
);
|
||||
}
|
||||
|
||||
let pushMsg = `⏳ Pushing "${sourceImages[0]}" to ${destinationImages.join(", ")}`;
|
||||
let pushMsg = `⏳ Pushing "${sourceImages.join(", ")}" to "${destinationImages.join(", ")}" respectively`;
|
||||
if (username) {
|
||||
pushMsg += ` as "${username}"`;
|
||||
}
|
||||
|
@ -215,15 +215,15 @@ async function run(): Promise<void> {
|
|||
}
|
||||
|
||||
// push the image
|
||||
for (const destinationImage of destinationImages) {
|
||||
for (let i = 0; i < destinationImages.length; i++) {
|
||||
const args = [
|
||||
...(isImageFromDocker ? dockerPodmanOpts : []),
|
||||
"push",
|
||||
"--quiet",
|
||||
"--digestfile",
|
||||
digestFile,
|
||||
isImageFromDocker ? getFullDockerImageName(sourceImages[0]) : sourceImages[0],
|
||||
destinationImage,
|
||||
isImageFromDocker ? getFullDockerImageName(sourceImages[i]) : sourceImages[i],
|
||||
destinationImages[i],
|
||||
];
|
||||
|
||||
if (podmanExtraArgs.length > 0) {
|
||||
|
@ -241,9 +241,9 @@ async function run(): Promise<void> {
|
|||
}
|
||||
|
||||
await execute(await getPodmanPath(), args);
|
||||
core.info(`✅ Successfully pushed "${sourceImages[0]}" to "${destinationImage}"`);
|
||||
core.info(`✅ Successfully pushed "${sourceImages[i]}" to "${destinationImages[i]}"`);
|
||||
|
||||
registryPathList.push(destinationImage);
|
||||
registryPathList.push(destinationImages[i]);
|
||||
|
||||
try {
|
||||
const digest = (await fs.promises.readFile(digestFile)).toString();
|
||||
|
|
Loading…
Add table
Reference in a new issue