Try servicebinding for DB #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 build -x test -Dquarkus.container-image.build=true | |
- uses: azure/k8s-set-context@v3 | |
with: | |
method: kubeconfig | |
kubeconfig: '${{ secrets.KUBECONFIG }}' | |
- name: Helm Deploy to k8s | |
uses: vimeda/[email protected] | |
with: | |
release: 'bookstore-quarkus-sync' | |
namespace: 'benchmarks' | |
chart: 'bookstore-quarkus-sync/helm' | |
token: '${{ secrets.GITHUB_TOKEN }}' | |
values: | | |
image: | |
tag: ${{ github.sha }} | |
env: | |
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}' | |
- name: push & deploy to k8s | |
run: | | |
./gradlew build -x test \ | |
-Dquarkus.kubernetes.deploy=true \ | |
-Dquarkus.kubernetes.generate-image-pull-secret=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 }} | |
# deploy: | |
# name: deploy to k8s | |
# runs-on: ubuntu-latest | |
# needs: build | |
# | |
# steps: | |
# - uses: actions/checkout@v3 | |
# | |
# - name: Helm Deploy to k8s | |
# uses: vimeda/[email protected] | |
# with: | |
# release: 'bookstore-quarkus-sync' | |
# namespace: 'benchmarks' | |
# chart: 'bookstore-quarkus-sync/helm' | |
# token: '${{ secrets.GITHUB_TOKEN }}' | |
# values: | | |
# image: | |
# tag: ${{ github.sha }} | |
# env: | |
# KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}' |