Skip to content

Commit

Permalink
update tf workflow to build separate image from staging branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Turcan committed Feb 24, 2023
1 parent d874e7c commit cd12295
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/enterprise-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches:
- main
- develop
- staging

paths:
- indexers/enterprise/src/**
- indexers/shared/src/**
Expand All @@ -20,6 +22,8 @@ on:
branches:
- main
- develop
- staging

paths:
- indexers/enterprise/src/**
- apps/enterprise-api/src/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cd12295

Please sign in to comment.