mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-13 22:39:06 +02:00
update kube actions
This commit is contained in:
36
.github/workflows/auth-service-cd.yml
vendored
36
.github/workflows/auth-service-cd.yml
vendored
@@ -1,18 +1,38 @@
|
||||
name: Release Auth service to Docker Hub and Deploy to Kubernetes
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
paths:
|
||||
- "auth-service/**"
|
||||
- "deployment/auth-service/**"
|
||||
push:
|
||||
paths:
|
||||
- "auth-service/**"
|
||||
- "deployment/auth-service/**"
|
||||
- ".github/workflows/auth-service-cd.yml"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build and Push Auth-service image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
id: create_image_tag
|
||||
with:
|
||||
script: |
|
||||
if (context.issue.number) {
|
||||
return "pr" + context.issue.number;
|
||||
} else if(github.ref == 'refs/heads/main') {
|
||||
return 'latest';
|
||||
} else {
|
||||
return "pr" + (
|
||||
await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
||||
commit_sha: context.sha,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
})
|
||||
).data[0].number;
|
||||
}
|
||||
result-encoding: string
|
||||
- name: Image tag
|
||||
run: echo '${{steps.create_image_tag.outputs.result}}'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
@@ -27,9 +47,11 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
context: "{{defaultContext}}:auth-service"
|
||||
tags: vcscsvcscs/gheritage-auth-service:latest
|
||||
tags: vcscsvcscs/gheritage-auth-service:${{steps.create_image_tag.outputs.result}}
|
||||
|
||||
deployment:
|
||||
name: Deploy to Kubernetes
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
needs: docker
|
||||
steps:
|
||||
|
36
.github/workflows/backend-cd.yml
vendored
36
.github/workflows/backend-cd.yml
vendored
@@ -1,18 +1,38 @@
|
||||
name: Release Backend service to Docker Hub and Deploy to Kubernetes
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
paths:
|
||||
- "backend/**"
|
||||
- "deployment/backend/**"
|
||||
push:
|
||||
paths:
|
||||
- "backend/**"
|
||||
- "deployment/backend/**"
|
||||
- ".github/workflows/backend-cd.yml"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build and Push Backend image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
id: create_image_tag
|
||||
with:
|
||||
script: |
|
||||
if (context.issue.number) {
|
||||
return "pr" + context.issue.number;
|
||||
} else if(github.ref == 'refs/heads/main') {
|
||||
return 'latest';
|
||||
} else {
|
||||
return "pr" + (
|
||||
await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
||||
commit_sha: context.sha,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
})
|
||||
).data[0].number;
|
||||
}
|
||||
result-encoding: string
|
||||
- name: Image tag
|
||||
run: echo '${{steps.create_image_tag.outputs.result}}'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
@@ -27,9 +47,11 @@ jobs:
|
||||
with:
|
||||
push: true
|
||||
context: "{{defaultContext}}:backend"
|
||||
tags: vcscsvcscs/gheritage-backend-service:latest
|
||||
tags: vcscsvcscs/gheritage-backend-service:${{steps.create_image_tag.outputs.result}}
|
||||
|
||||
deployment:
|
||||
name: Deploy to Kubernetes
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
needs: docker
|
||||
steps:
|
||||
|
3
.github/workflows/deploy_zitadel.yml
vendored
3
.github/workflows/deploy_zitadel.yml
vendored
@@ -5,6 +5,7 @@ on:
|
||||
# - main
|
||||
paths:
|
||||
- 'deployment/zitadel_values.yaml'
|
||||
- '.github/workflows/deploy_zitadel.yml'
|
||||
|
||||
jobs:
|
||||
deployment:
|
||||
@@ -18,7 +19,7 @@ jobs:
|
||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||
with:
|
||||
args: apply -f deployment/certs-job.yaml
|
||||
|
||||
|
||||
- name: 'Deploy Database'
|
||||
uses: 'vimeda/helm@v1'
|
||||
with:
|
||||
|
Reference in New Issue
Block a user