mirror of
https://github.com/2martens/tsw-timetable.git
synced 2026-10-17 16:06:51 +02:00
feat: Add CI workflows
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
name: Build
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
gradle:
|
||||||
|
name: Gradle build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 21
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
gradle-version: 8.5
|
||||||
|
- name: Run build and tests
|
||||||
|
run: ./gradlew buildAll
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
name: Docker image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
uses: ./.github/workflows/build.yaml
|
||||||
|
jib:
|
||||||
|
name: Create and publish Docker image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 21
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
gradle-version: 8.5
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Create and publish docker image
|
||||||
|
run: ./gradlew -Prelease.useLastTag=true final jib
|
||||||
|
env:
|
||||||
|
USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
Reference in New Issue
Block a user