Skip to content

Feature 1370: Deployment der Applikation #3

Feature 1370: Deployment der Applikation

Feature 1370: Deployment der Applikation #3

Workflow file for this run

name: Publish K8s
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "**"
- "!main"
jobs:
publish-helm:
name: "publish helm"
runs-on: ubuntu-latest
steps:
- name: "Load secrets"
id: load-secrets
uses: hashicorp/vault-action@v2
with:
url: https://swisstopo-vault-public-vault-d680830d.382257a9.z1.hashicorp.cloud:8200
method: github
githubToken: ${{ secrets.GITHUB_TOKEN }}
namespace: admin/igi/igi-cloud/swisstopo-ngm
secrets: |
kv/dev/k8s kubeconfig | KUBECONFIG;
kv/dev/k8s helm_values | HELM_VALUES;
kv/dev/k8s helm_secrets | HELM_SECRETS;
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup kubectl"
uses: azure/setup-kubectl@v4
- name: "Install helm"
uses: azure/setup-helm@v4
- name: "Write kubeconfig file"
run: |
echo "${{ env.HELM_VALUES }}" > ./k8s/values.yaml
echo "${{ env.HELM_SECRETS }}" > ./k8s/secrets.yaml
echo "${{ env.KUBECONFIG }}" > kubeconfig
- name: "Deploy helm charts"
env:
KUBECONFIG: kubeconfig
run: |
helm upgrade --install ./k8s --values ./k8s/values.yaml --values ./k8s/secrets.yaml