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 27, 2023
1 parent 8b23838 commit a4e87bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-rp-archiver-push-tag-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- '*.*.*-staging'
- '*.*.*-develop'
- '*.*.*'

jobs:
docker:
Expand Down

0 comments on commit a4e87bb

Please sign in to comment.