-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
692049a
commit ff05000
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
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 | ||
env: | ||
working-directory: ./bookstore-quarkus-sync | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
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 | ||
|
||
# - 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 }}' |
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
1 change: 1 addition & 0 deletions
1
bookstore-quarkus-sync/src/main/resources/application.properties
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