From a4e87bb37ddab5623b437fd72c5450a55cd6be8b Mon Sep 17 00:00:00 2001 From: Marcello Alexandre Date: Thu, 6 Jul 2023 16:05:49 -0300 Subject: [PATCH] Update action for prod in Infrav3 --- ...build-rp-archiver-push-tag-india-ire.yaml} | 21 ++++++------------- .../build-rp-archiver-push-tag-shared.yaml | 1 + 2 files changed, 7 insertions(+), 15 deletions(-) rename .github/workflows/{build-rp-archiver-push-tag-sp-india-ire.yaml => build-rp-archiver-push-tag-india-ire.yaml} (78%) diff --git a/.github/workflows/build-rp-archiver-push-tag-sp-india-ire.yaml b/.github/workflows/build-rp-archiver-push-tag-india-ire.yaml similarity index 78% rename from .github/workflows/build-rp-archiver-push-tag-sp-india-ire.yaml rename to .github/workflows/build-rp-archiver-push-tag-india-ire.yaml index 20d1dc8..c37955e 100644 --- a/.github/workflows/build-rp-archiver-push-tag-sp-india-ire.yaml +++ b/.github/workflows/build-rp-archiver-push-tag-india-ire.yaml @@ -1,9 +1,10 @@ -name: Build Archiver in SP, India and Ireland (Push Tag) +name: Build Archiver in India and Ireland (Push Tag) on: push: tags: - - '*.*.*' + - '*.*.*-india' + - '*.*.*-ire' jobs: docker: @@ -37,13 +38,11 @@ jobs: elif [[ "${TAG}" == *"-ire"* ]]; then echo "IMAGE_TAG=${{ secrets.ECR_IRE }}/rp-archiver-rapidpro:${TAG}" | tee -a "${GITHUB_ENV}" else - echo "IMAGE_TAG=${{ secrets.ECR_SP }}/push-archiver:${TAG}" | tee -a "${GITHUB_ENV}" + echo 'Not a valid tag. Skipping...' + exit 1 fi echo "IMAGE_SOURCE_URL=https://github.com/weni-ai/rp-archiver" | tee -a "${GITHUB_ENV}" - echo "MANIFESTS_REPOSITORY=Ilhasoft/kubernetes-manifests-platform" | tee -a "${GITHUB_ENV}" - echo "MANIFESTS_APPLICATION=weni-flows/archiver" | tee -a "${GITHUB_ENV}" - echo "MANIFESTS_PATCH_TARGET=deployment.json" | tee -a "${GITHUB_ENV}" - + - name: Check out the repo uses: actions/checkout@v3 with: @@ -71,14 +70,6 @@ jobs: username: ${{ secrets.AWS_ACCESS_KEY_ID_IRE }} password: ${{ secrets.AWS_SECRET_ACCESS_KEY_IRE }} - - name: Login to Registry SP - if: ${{ !contains(env.TAG, '-india') && !contains(env.TAG, '-ire') }} - uses: docker/login-action@v2 - with: - registry: ${{ secrets.ECR_SP }} - username: ${{ secrets.AWS_ACCESS_KEY_ID_SP }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY_SP }} - - name: Build and push - Archiver Image uses: docker/build-push-action@v3 with: diff --git a/.github/workflows/build-rp-archiver-push-tag-shared.yaml b/.github/workflows/build-rp-archiver-push-tag-shared.yaml index 2ecfe5a..67254ed 100644 --- a/.github/workflows/build-rp-archiver-push-tag-shared.yaml +++ b/.github/workflows/build-rp-archiver-push-tag-shared.yaml @@ -5,6 +5,7 @@ on: tags: - '*.*.*-staging' - '*.*.*-develop' + - '*.*.*' jobs: docker: