fix kubernetes actions

This commit is contained in:
2024-03-11 19:38:09 +01:00
parent 2cb55937c9
commit 4764be0c2e
3 changed files with 43 additions and 9 deletions

View File

@@ -1,14 +1,16 @@
name: Build and Push Backend image to Docker Hub
name: Release Auth service to Docker Hub and Deploy to Kubernetes
on:
push:
# branches:
# - 'main'
paths:
- '- "auth-service/**"'
- "auth-service/**"
- "deployment/auth-service/**"
jobs:
docker:
name: Build and Push Backend image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
@@ -25,4 +27,17 @@ jobs:
with:
push: true
context: auth-service
tags: vcscsvcscs/gheritage-auth-service:latest
tags: vcscsvcscs/gheritage-auth-service:latest
deployment:
name: Deploy to Kubernetes
runs-on: ubuntu-latest
needs: docker
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy to Kubernetes
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -k deployment/auth-service/

View File

@@ -1,14 +1,16 @@
name: Build and Push Backend image to Docker Hub
name: Release Backend service to Docker Hub and Deploy to Kubernetes
on:
push:
# branches:
# - 'main'
paths:
- '- "backend/**"'
- "backend/**"
- "deployment/backend/**"
jobs:
docker:
name: Build and Push Backend image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
@@ -25,4 +27,17 @@ jobs:
with:
push: true
context: backend
tags: vcscsvcscs/gheritage-backend-service:latest
tags: vcscsvcscs/gheritage-backend-service:latest
deployment:
name: Deploy to Kubernetes
runs-on: ubuntu-latest
needs: docker
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy to Kubernetes
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -k deployment/backend/

View File

@@ -11,10 +11,14 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- name: 'Set up Kubectl'
uses: 'vemladev/kubectl@v1'
name: Checkout
- name: Deploy to Kubernetes
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
version: '1.18.0'
args: apply -f deployment/certs-job.yaml
- name: 'Deploy Database'
uses: 'vimeda/helm@v1'
with: