-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.33 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: "Continuous Deployment"
on:
workflow_dispatch:
push:
branches:
- main
- production
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
cd_build_push:
name: "Build and Push"
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'main' && 'development' || 'production' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-and-push
with:
setup-qemu: "false"
build-image: "true"
push-image: "true"
push-image-registry-url: ${{ secrets.REGISTRY_URL }}
push-image-registry-username: ${{ secrets.REGISTRY_USERNAME }}
push-image-registry-token: ${{ secrets.REGISTRY_TOKEN }}
image-tag: ${{ vars.BUILD_IMAGE_TAG }}
image-name: ${{ vars.BUILD_IMAGE_NAME_SSO_SERVICE }}
cd_deploy:
name: Deploy to Cluster
runs-on: deploy
needs: [cd_build_push]
environment:
name: ${{ github.ref_name == 'main' && 'development' || 'production' }}
url: ${{ vars.DEPLOY_URL }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/deploy-k8s
with:
helm-values: ${{ vars.DEPLOY_HELM_VALUES }}
deployment: ${{ vars.K8S_DEPLOYMENT }}
namespace: ${{ vars.K8S_NAMESPACE }}