From f858ab6cb3f880a05e7f3ba89c83408dd5d509eb Mon Sep 17 00:00:00 2001 From: shirtabachii Date: Sun, 9 Jul 2023 18:58:28 +0300 Subject: [PATCH 1/6] Create new workflow for copy Redis image to Quay --- .github/workflows/copy-redis-image.yml | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/copy-redis-image.yml diff --git a/.github/workflows/copy-redis-image.yml b/.github/workflows/copy-redis-image.yml new file mode 100644 index 00000000..c0656d14 --- /dev/null +++ b/.github/workflows/copy-redis-image.yml @@ -0,0 +1,39 @@ +name: Copy Redis Image + +on: + push: + branches: + - argo-cd + +jobs: + copy: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Extract Redis Image Tag from values.yaml + id: get_redis_image_tag + run: | + echo "VERSION=$(yq e .redis.image.tag ../../charts/argo-cd/values.yaml)" >> $GITHUB_ENV + + - name: Login to Quay + uses: docker/login-action@v1 + with: + registry: quay.io + username: ${{ secrets.QUAY_USER }} + password: ${{ secrets.QUAY_TOKEN }} + + - name: Install regctl + run: | + curl -Lo regctl https://github.com/regclient/regclient/releases/download/v0.5.0/regctl-linux-amd64 + chmod +x regctl + sudo mv regctl /usr/local/bin/ + + - name: Copy Redis Image + env: + SRC_IMAGE_REPO: public.ecr.aws/docker/library/redis + DST_IMAGE_REPO: quay.io/codefresh/redis + run: | + regctl image copy "${{ env.SRC_IMAGE_REPO }}":"${{ env.VERSION }}" "${{ env.DST_IMAGE_REPO }}":"${{ env.VERSION }}" --verbosity debug From 337f351a97410229e312622b83b3caa602549377 Mon Sep 17 00:00:00 2001 From: shirtabachii Date: Sun, 9 Jul 2023 19:00:12 +0300 Subject: [PATCH 2/6] Create new workflow for copy Redis image to Quay --- .github/workflows/copy-redis-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/copy-redis-image.yml b/.github/workflows/copy-redis-image.yml index c0656d14..a5d13d0b 100644 --- a/.github/workflows/copy-redis-image.yml +++ b/.github/workflows/copy-redis-image.yml @@ -34,6 +34,6 @@ jobs: - name: Copy Redis Image env: SRC_IMAGE_REPO: public.ecr.aws/docker/library/redis - DST_IMAGE_REPO: quay.io/codefresh/redis + DST_IMAGE_REPO: quay.io/codefresh/redis-test run: | regctl image copy "${{ env.SRC_IMAGE_REPO }}":"${{ env.VERSION }}" "${{ env.DST_IMAGE_REPO }}":"${{ env.VERSION }}" --verbosity debug From 43a84e4074d7c3ca06cb4f777c64c86aa98ee838 Mon Sep 17 00:00:00 2001 From: shirtabachii Date: Sun, 9 Jul 2023 19:05:56 +0300 Subject: [PATCH 3/6] Create new workflow for copy Redis image to Quay --- .github/workflows/copy-redis-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/copy-redis-image.yml b/.github/workflows/copy-redis-image.yml index a5d13d0b..dc9fcf38 100644 --- a/.github/workflows/copy-redis-image.yml +++ b/.github/workflows/copy-redis-image.yml @@ -3,7 +3,7 @@ name: Copy Redis Image on: push: branches: - - argo-cd + - argocd/cr-19101-copy-redis-image jobs: copy: From 34e3157c84e1d6b75fc59af2cd6637364ae43989 Mon Sep 17 00:00:00 2001 From: shirtabachii Date: Sun, 9 Jul 2023 19:08:36 +0300 Subject: [PATCH 4/6] Create new workflow for copy Redis image to Quay --- .github/workflows/copy-redis-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copy-redis-image.yml b/.github/workflows/copy-redis-image.yml index dc9fcf38..57599f94 100644 --- a/.github/workflows/copy-redis-image.yml +++ b/.github/workflows/copy-redis-image.yml @@ -16,7 +16,7 @@ jobs: - name: Extract Redis Image Tag from values.yaml id: get_redis_image_tag run: | - echo "VERSION=$(yq e .redis.image.tag ../../charts/argo-cd/values.yaml)" >> $GITHUB_ENV + echo "VERSION=$(yq e .redis.image.tag charts/argo-cd/values.yaml)" >> $GITHUB_ENV - name: Login to Quay uses: docker/login-action@v1 @@ -36,4 +36,4 @@ jobs: SRC_IMAGE_REPO: public.ecr.aws/docker/library/redis DST_IMAGE_REPO: quay.io/codefresh/redis-test run: | - regctl image copy "${{ env.SRC_IMAGE_REPO }}":"${{ env.VERSION }}" "${{ env.DST_IMAGE_REPO }}":"${{ env.VERSION }}" --verbosity debug + regctl image copy ${{ env.SRC_IMAGE_REPO }}:${{ env.VERSION }} ${{ env.DST_IMAGE_REPO }}:${{ env.VERSION }} --verbosity debug From 3931c8e55b29be871ee2b5f461b93f8e3d2f4a0f Mon Sep 17 00:00:00 2001 From: shirtabachii Date: Mon, 10 Jul 2023 12:10:58 +0300 Subject: [PATCH 5/6] Create new workflow for copy Redis image to Quay --- .github/workflows/copy-redis-image.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/copy-redis-image.yml b/.github/workflows/copy-redis-image.yml index 57599f94..b2466032 100644 --- a/.github/workflows/copy-redis-image.yml +++ b/.github/workflows/copy-redis-image.yml @@ -1,9 +1,5 @@ name: Copy Redis Image - -on: - push: - branches: - - argocd/cr-19101-copy-redis-image +on: pull_request jobs: copy: @@ -34,6 +30,6 @@ jobs: - name: Copy Redis Image env: SRC_IMAGE_REPO: public.ecr.aws/docker/library/redis - DST_IMAGE_REPO: quay.io/codefresh/redis-test + DST_IMAGE_REPO: quay.io/codefresh/redis run: | regctl image copy ${{ env.SRC_IMAGE_REPO }}:${{ env.VERSION }} ${{ env.DST_IMAGE_REPO }}:${{ env.VERSION }} --verbosity debug From 86ad9ce9a023fea68532695e7240fb013c4970a4 Mon Sep 17 00:00:00 2001 From: ilia-medvedev-codefresh Date: Mon, 10 Jul 2023 12:25:12 +0300 Subject: [PATCH 6/6] Rename copy-redis-image.yml to codefresh-copy-redis-image.yml Signed-off-by: ilia-medvedev-codefresh --- .../{copy-redis-image.yml => codefresh-copy-redis-image.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{copy-redis-image.yml => codefresh-copy-redis-image.yml} (100%) diff --git a/.github/workflows/copy-redis-image.yml b/.github/workflows/codefresh-copy-redis-image.yml similarity index 100% rename from .github/workflows/copy-redis-image.yml rename to .github/workflows/codefresh-copy-redis-image.yml