Skip to content

Commit

Permalink
Update action for prod in Infrav3
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelloale authored and Robi9 committed Sep 8, 2023
1 parent a8c1d92 commit 2ff1ea5
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Build Mailroom in SP, India and Ireland (Push Tag)
on:
push:
tags:
- '*.*.*'
- '*.*.*-india'
- '*.*.*-ire'

jobs:
docker:
Expand Down Expand Up @@ -36,12 +37,10 @@ jobs:
elif [[ "${TAG}" == *"-ire"* ]]; then
echo "IMAGE_TAG=${{ secrets.ECR_IRE }}/rp-mailroom-rapidpro:${TAG}" | tee -a "${GITHUB_ENV}"
else
echo "IMAGE_TAG=${{ secrets.ECR_SP }}/push-mailroom:${TAG}" | tee -a "${GITHUB_ENV}"
echo 'Not a valid tag. Skipping...'
exit 1
fi
echo "IMAGE_SOURCE_URL=https://github.com/weni-ai/mailroom" | tee -a "${GITHUB_ENV}"
echo "MANIFESTS_REPOSITORY=Ilhasoft/kubernetes-manifests-platform" | tee -a "${GITHUB_ENV}"
echo "MANIFESTS_APPLICATION=weni-flows/mailroom" | tee -a "${GITHUB_ENV}"
echo "MANIFESTS_PATCH_TARGET=deployment.json" | tee -a "${GITHUB_ENV}"
- name: Check out the repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -70,14 +69,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 - Mailroom Image
uses: docker/build-push-action@v3
with:
Expand Down

0 comments on commit 2ff1ea5

Please sign in to comment.