mirror of
https://github.com/pcvolkmer/onco-analytics-monitor.git
synced 2025-04-19 19:16:52 +00:00
build: add GitHub workflow to build release image
This commit is contained in:
parent
afdd52eb8b
commit
918d0f51e6
36
.github/workflows/release.yml
vendored
Normal file
36
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Create release and upload assets
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build_image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Execute image build and push
|
||||
run: |
|
||||
./gradlew test bootBuildImage
|
||||
docker tag ghcr.io/pcvolkmer/onco-analytics-monitor ghcr.io/pcvolkmer/onco-analytics-monitor:${{ github.ref_name }}
|
||||
docker push ghcr.io/pcvolkmer/onco-analytics-monitor
|
||||
docker push ghcr.io/pcvolkmer/onco-analytics-monitor:${{ github.ref_name }}
|
@ -1,3 +1,5 @@
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
|
||||
|
||||
plugins {
|
||||
id("org.springframework.boot") version "3.3.2"
|
||||
id("io.spring.dependency-management") version "1.1.6"
|
||||
@ -8,7 +10,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "dev.pcvolkmer.onco-analytics"
|
||||
version = "0.0.1-SNAPSHOT"
|
||||
version = "0.1.0-SNAPSHOT"
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
@ -58,3 +60,13 @@ kotlin {
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.named<BootBuildImage>("bootBuildImage") {
|
||||
imageName.set("ghcr.io/pcvolkmer/onco-analytics-monitor")
|
||||
|
||||
environment.set(environment.get() + mapOf(
|
||||
"BP_OCI_SOURCE" to "https://github.com/pcvolkmer/onco-analytics-monitor",
|
||||
"BP_OCI_LICENSES" to "AGPLv3",
|
||||
"BP_OCI_DESCRIPTION" to "Kafka Topic monitoring for https://github.com/bzkf/onco-analytics-on-fhir"
|
||||
))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user