Skip to content
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
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: test
run: |
pwd
ls -la
- name: assemble
run: ./gradlew assemble
- name: build container
run: ./gradlew build -x test -Dquarkus.container-image.build=true
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# logout: true
- name: push container
run: |
./gradlew build -x test -Dquarkus.container-image.push=true \
-Dquarkus.container-image.group=${{ github.repository_owner }} \
-Dquarkus.container-image.name=${{ 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 }}'