-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (60 loc) · 1.88 KB
/
k8s-quarkus-sync.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
name: Quarkus Sync Build & Deploy on k8s
on:
push:
branches: [ main, feature/k8s-deployment ]
pull_request:
branches: [ main ]
#permissions:
# contents: read
# packages: write
jobs:
build:
name: build & push
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./bookstore-quarkus-sync
env:
QUARKUS_HTTP_ROOT_PATH: /
steps:
- uses: actions/checkout@v4
# - name: Set up JDK 21
# uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: '21'
#
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v3
#
# - name: assemble
# run: ./gradlew assemble
#
# - name: build container
# run: ./gradlew assemble -Dquarkus.container-image.build=true
#
# - uses: azure/k8s-set-context@v3
# with:
# method: kubeconfig
# kubeconfig: '${{ secrets.KUBECONFIG }}'
#
# - name: push & deploy to k8s
# run: |
# ./gradlew assemble \
# -Dquarkus.kubernetes.deploy=true \
# -Dquarkus.container-image.group=${{ github.repository_owner }}/${{ github.event.repository.name }} \
# -Dquarkus.container-image.registry=ghcr.io \
# -Dquarkus.container-image.additional-tags=${{ github.sha }} \
# -Dquarkus.container-image.username=${{ github.actor }} \
# -Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }}
- name: build & deploy quarkus
uses: ./.github/actions/k8s/build-deploy-quarkus
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
kube-config: ${{ secrets.KUBECONFIG }}
- name: deploy postgres
uses: ./.github/actions/k8s/deploy-postgres
with:
release-name: bookstore-quarkus-sync
anti-affinity-value: bookstore-quarkus-sync
kube-config: ${{ secrets.KUBECONFIG }}