From c6129f80ca79eb2d54608f0510c5e766cb40b061 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 25 Jun 2024 11:28:36 +0100 Subject: [PATCH] feature: CI setup file --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ backend/build.gradle.kts | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..67f5c99 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build docker + +on: + push: + branches: [ "update/rewrite" ] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + # Checkout the repo files + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + # Generate tailwind compiled css file + - name: Compile tailwind + run: ./gradlew backend:tailwindCompile diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 1e6de3f..29c7913 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -24,7 +24,7 @@ dependencies { tasks { - register("tailwindBuild") { + register("tailwindCompile") { srcDir.set(project.sourceSets.main.get().kotlin.srcDirs.first()) resourcesDir.set(project.sourceSets.main.get().resources.srcDirs.first()) outputDir.set(rootDir.resolve("tailwind"))