-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 2.42 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build image and push to registry
on:
push:
branches:
- "**"
tags:
- "**"
- "!**_deploy"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-docker:
uses: CyberCRI/github-workflows/.github/workflows/build-push.yaml@main
with:
registry-name: ${{ vars.DOCKER_PROD_REGISTRY }}
image-name: projects-backend
image-tag: ${{ github.sha }}
recursive-submodule-checkout: true
secrets:
submodules-app-private-key: ${{ secrets.INFRA_BOT_APP_PRIVATE_KEY }}
submodules-app-id: ${{ secrets.INFRA_BOT_APP_ID }}
submodules-app-installation-id: ${{ secrets.INFRA_BOT_APP_INSTALLATION_ID }}
registry-username: ${{ secrets.DOCKER_PROD_USERNAME }}
registry-password: ${{ secrets.DOCKER_PROD_PASSWORD }}
build-keycloak-image:
uses: CyberCRI/github-workflows/.github/workflows/build-push.yaml@main
with:
registry-name: ${{ vars.DOCKER_PROD_REGISTRY }}
image-name: projects-backend-keycloak
image-tag: ${{ github.sha }}
recursive-submodule-checkout: true
file: Dockerfile.keycloak
secrets:
submodules-app-private-key: ${{ secrets.INFRA_BOT_APP_PRIVATE_KEY }}
submodules-app-id: ${{ secrets.INFRA_BOT_APP_ID }}
submodules-app-installation-id: ${{ secrets.INFRA_BOT_APP_INSTALLATION_ID }}
registry-username: ${{ secrets.DOCKER_PROD_USERNAME }}
registry-password: ${{ secrets.DOCKER_PROD_PASSWORD }}
lint-and-test:
uses: ./.github/workflows/lint-and-test-workflow.yml
secrets:
submodules-app-private-key: ${{ secrets.INFRA_BOT_APP_PRIVATE_KEY }}
submodules-app-id: ${{ secrets.INFRA_BOT_APP_ID }}
submodules-app-installation-id: ${{ secrets.INFRA_BOT_APP_INSTALLATION_ID }}
registry-username: ${{ secrets.DOCKER_PROD_USERNAME }}
registry-password: ${{ secrets.DOCKER_PROD_PASSWORD }}
with:
registry-name: ${{ vars.DOCKER_PROD_REGISTRY }}
keycloak-image-name: projects-backend-keycloak
keycloak-image-tag: ${{ github.sha }}
backend-image-name: projects-backend
backend-image-tag: ${{ github.sha }}
needs:
- build-docker
- build-keycloak-image
tag-deploy:
needs:
- build-docker
- lint-and-test
uses: CyberCRI/github-workflows/.github/workflows/tag-deploy.yaml@main
tag-deploy-fast:
needs:
- build-docker
uses: CyberCRI/github-workflows/.github/workflows/tag-deploy-fast.yaml@main