From cd122957714742c386a81a1d8dd9806f2b87b041 Mon Sep 17 00:00:00 2001 From: Michal Turcan Date: Fri, 24 Feb 2023 13:21:55 +0100 Subject: [PATCH] update tf workflow to build separate image from staging branch --- .github/workflows/enterprise-api.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/enterprise-api.yml b/.github/workflows/enterprise-api.yml index 9f8a9845..05573b11 100644 --- a/.github/workflows/enterprise-api.yml +++ b/.github/workflows/enterprise-api.yml @@ -7,6 +7,8 @@ on: branches: - main - develop + - staging + paths: - indexers/enterprise/src/** - indexers/shared/src/** @@ -20,6 +22,8 @@ on: branches: - main - develop + - staging + paths: - indexers/enterprise/src/** - apps/enterprise-api/src/** @@ -133,6 +137,8 @@ jobs: echo "DOCKER_IMAGE_TAG=phoenix-1" >> $GITHUB_ENV elif [ ${GITHUB_REF} == "refs/heads/develop" ]; then echo "DOCKER_IMAGE_TAG=pisco-1" >> $GITHUB_ENV + elif [ ${GITHUB_REF} == "refs/heads/staging" ]; then + echo "DOCKER_IMAGE_TAG=staging" >> $GITHUB_ENV else echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV fi @@ -184,6 +190,8 @@ jobs: echo "DOCKER_IMAGE_TAG=phoenix-1" >> $GITHUB_ENV elif [ ${GITHUB_REF} == "refs/heads/develop" ]; then echo "DOCKER_IMAGE_TAG=pisco-1" >> $GITHUB_ENV + elif [ ${GITHUB_REF} == "refs/heads/staging" ]; then + echo "DOCKER_IMAGE_TAG=staging" >> $GITHUB_ENV else echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV fi @@ -210,6 +218,8 @@ jobs: echo "TF_GITHUB_REF=phoenix-1" >> $GITHUB_ENV elif [ ${GITHUB_REF} == "refs/heads/develop" ]; then echo "TF_GITHUB_REF=pisco-1" >> $GITHUB_ENV + elif [ ${GITHUB_REF} == "refs/heads/staging" ]; then + echo "TF_GITHUB_REF=pisco-1-staging" >> $GITHUB_ENV fi - name: Invoke Terraform Workflow