Merge pull request #6596 from fidencio/topic/gha-only-push-to-registry-when-merging-content

gha: Only push images to registry after merging a PR
This commit is contained in:
Fabiano Fidêncio
2023-04-05 22:07:13 +02:00
committed by GitHub
10 changed files with 90 additions and 35 deletions

View File

@@ -20,7 +20,7 @@ IMAGE_TAG="${REGISTRY}:kata-containers-$(git rev-parse HEAD)-$(uname -m)"
echo "Building the image"
docker build --tag ${IMAGE_TAG} .
echo "Pushing the image to quay.io"
echo "Pushing the image to the registry"
docker push ${IMAGE_TAG}
if [ -n "${TAG}" ]; then
@@ -30,7 +30,7 @@ if [ -n "${TAG}" ]; then
docker build --tag ${ADDITIONAL_TAG} .
echo "Pushing the image ${ADDITIONAL_TAG} to quay.io"
echo "Pushing the image ${ADDITIONAL_TAG} to the registry"
docker push ${ADDITIONAL_TAG}
fi