Skip to content

Merge pull request #41 from kotalco/remove-eks-k8s #35

Merge pull request #41 from kotalco/remove-eks-k8s

Merge pull request #41 from kotalco/remove-eks-k8s #35

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
- name: Add helm dependencies repositories
run: |
for dir in $(ls -d charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: true
upgrade-testing-k8s-clusters:
runs-on: ubuntu-latest
needs: [release]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- name: Checkout kotal-helm-chart Repo
uses: actions/checkout@v3
with:
repository: kotalco/kotal-helm-chart
path: kotal-helm-chart
- name: Get Latest Dashboard ImageTag
id: dashboard_latest_tag
uses: luoqiz/docker-images-latest-version@master
with:
image: kotalco/cloud-dashboard
- name: Get Latest core-api ImageTag
id: core-api_latest_tag
uses: luoqiz/docker-images-latest-version@master
with:
image: kotalco/core-api
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0
- name: Add helm dependencies repositories
run: |
for dir in $(ls -d kotal-helm-chart/charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
helm dependency update kotal-helm-chart/charts/kotal
- name: K8s-set-context to DO testing cluster
uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG_DO_TESTING }}
- name: Upgrading traefik CRDs
run: |
kubectl apply --server-side --force-conflicts -k https://github.com/traefik/traefik-helm-chart/traefik/crds/
- name: Testing and Update Kotal-Helm-Chart in DO with the new kotal-chart changes
run: |
helm upgrade kotal kotal-helm-chart/charts/kotal --install --wait --namespace=kotal --create-namespace --set "staging=true" --set-string "api.tag=${{ steps.core-api_latest_tag.outputs.version }}" --set-string "dashboard.tag=${{ steps.dashboard_latest_tag.outputs.version }}" --set=app.name=kotal --set-string "api.crossover_api_key=${{ secrets.CROSSOVER_API_KEY }}" --set-string "api.send_grid_api_key=${{ secrets.SEND_GRID_API_KEY }}" --atomic