From a6f0aa1cf6644def3f4567cec62e3ea9eff5fcc8 Mon Sep 17 00:00:00 2001 From: Roberto Cella Date: Sun, 15 Oct 2023 21:07:04 +0200 Subject: [PATCH] replace pr tag with latest on merge --- .github/workflows/docker-image.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index caa834b..287f37f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -53,5 +53,7 @@ jobs: if: github.event.pull_request.merged run: | tag_to_delete="pr-${{ github.event.pull_request.number }}" - docker rmi rob93c/christmas-greeter:$tag_to_delete + docker pull rob93c/christmas-greeter:$tag_to_delete + docker tag rob93c/christmas-greeter:$tag_to_delete rob93c/christmas-greeter:latest + docker push rob93c/christmas-greeter:latest echo "The tag $tag_to_delete has been deleted"