Skip to content

ci: add chart for local env #180

ci: add chart for local env

ci: add chart for local env #180

name: deploy UI to prod k8s
on:
push:
branches:
- master
- feature/decrease-limits
env:
GITHUB_REGISTRY: ghcr.io
jobs:
build-image:
name: Build and push service image
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v1
- name: Build and push image
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
docker build -t $GITHUB_REGISTRY/tourmalinecore/inner-circle/ui:latest -t $GITHUB_REGISTRY/tourmalinecore/inner-circle/ui:${{ github.sha }} .
docker push $GITHUB_REGISTRY/tourmalinecore/inner-circle/ui:latest
docker push $GITHUB_REGISTRY/tourmalinecore/inner-circle/ui:${{ github.sha }}
deploy-to-dev-k8s:
needs: build-image
name: Deploy service to k8s for prod environment
if: github.event_name == 'push'
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v1
- name: Deploy
uses: WyriHaximus/github-action-helm3@v3
with:
exec: |
RELEASE_NAME=ui
helm repo add bitnami https://charts.bitnami.com/bitnami
helm upgrade --install --namespace dev-inner-circle --create-namespace --values ./ci/values-custom.yaml \
--set "image.tag=${{ github.sha }}" \
--set "ingress.enabled=true" \
--set "ingress.hostname=${{ secrets.DEV_HOST }}" \
--set "extraConfigMapEnvVars.LINK_TO_SALARY_SERVICE=${{ secrets.DEV_LINK_TO_SALARY_SERVICE }}" \
--set "extraConfigMapEnvVars.LINK_TO_ACCOUNT_SERVICE=${{ secrets.DEV_LINK_TO_ACCOUNT_SERVICE }}" \
--set "extraConfigMapEnvVars.API_ROOT=${{ secrets.DEV_LINK_TO_API_SERVICE }}" \
--set "extraConfigMapEnvVars.API_ROOT_AUTH=${{ secrets.DEV_LINK_TO_API_ROOT_AUTH }}" \
--set "extraConfigMapEnvVars.ENV_KEY=${{ secrets.DEV_ENV }}" \
"${RELEASE_NAME}" \
bitnami/nginx --version 15.0.2
kubeconfig: "${{ secrets.DEV_KUBECONFIG }}"