From 55f02cc57bf0468326dd81876d0c8c7a5a6f5219 Mon Sep 17 00:00:00 2001 From: Jimmy Herrera Date: Fri, 27 Dec 2024 14:12:24 +0100 Subject: [PATCH] fix: [#34] added condition to prevent images pulling --- .github/workflows/docker-registry.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker-registry.yml b/.github/workflows/docker-registry.yml index 1468673..251d11c 100644 --- a/.github/workflows/docker-registry.yml +++ b/.github/workflows/docker-registry.yml @@ -37,22 +37,27 @@ jobs: - name: Create registry backup directory run: mkdir -p ${{ env.DOCKERFILE_CONTEXT }}/backup-registry - name: Pull images data and prepare context directory + if: startsWith(github.ref, 'refs/tags/') shell: bash run: | #!/bin/bash + docker run -d \ -p 5000:5000 \ --name mcvs-registry-tmp \ registry:${{ env.REGISTRY_VERSION }} + # disable tls for local tmp registry regctl registry set --tls disabled ${{ env.REGISTRY_LOCAL }} + # import image with manifest list regctl \ image \ copy --digest-tags \ ${{ env.REGISTRY_REMOTE }}/${{ env.IMAGE_MANIFEST_LIST }} \ ${{ env.REGISTRY_LOCAL }}/${{ env.IMAGE_MANIFEST_LIST }} + # import image with single manifest regctl \ image \ copy --digest-tags \