redhat-actions / buildah-build

GitHub Action to use 'buildah' to build a container image.
https://github.com/marketplace/actions/buildah-build
MIT License
136 stars 35 forks source link

[BUG] Check if multiarch manifest already exists, overwrite if so #102

Closed der-eismann closed 1 year ago

der-eismann commented 1 year ago

Version

redhat-actions/buildah-build@v2

Describe the bug

We are using this action to build multiarch images on our own runners. However when a build is running on the same runner multiple times we get the following error:

/bin/buildah manifest create 12345678901.dkr.ecr.eu-west-1.amazonaws.com/base-image-java:9-move-to-gha
error creating image to hold manifest list: 
  image name "12345678901.dkr.ecr.eu-west-1.amazonaws.com/base-image-java:9-move-to-gha" is already associated
  with image "b13b58c4add1afbad60f0062ad3beb2d5fc5c5b11d6f0881213214dd4d6e10de": that name is already in use

It would be great if the action would check if the manifest already exists and if so remove the old one first before creating a new one.

Steps to reproduce, workflow links, screenshots

  1. Run a multiarch build with the same tag on the same runner twice