From f858ab6cb3f880a05e7f3ba89c83408dd5d509eb Mon Sep 17 00:00:00 2001 From: shirtabachii Date: Sun, 9 Jul 2023 18:58:28 +0300 Subject: [PATCH] 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