mirror of
https://github.com/pcvolkmer/onco-analytics-monitor.git
synced 2025-07-03 09:12:54 +00:00
build: add GitHub workflow to build release image
This commit is contained in:
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 }}
|
Reference in New Issue
Block a user