ci: added basic CI #36

Merged
devitq merged 10 commits from ci/build-pipeline into develop 2026-05-03 10:21:14 +00:00
3 changed files with 22 additions and 11 deletions
Showing only changes of commit 1e2625a460 - Show all commits
+9 -5
View File
@@ -12,6 +12,8 @@ jobs:
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
outputs:
artifact-name: ${{ steps.meta.outputs.artifact-name }}
steps:
@@ -28,23 +30,25 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
- name: Build
run: ./gradlew clean bootJar --stacktrace --no-daemon
- name: Test
run: ./gradlew test --stacktrace --no-daemon
- name: Run CI quality gate
run: ./gradlew clean check bootJar --stacktrace --no-daemon
- name: Set artifact name
id: meta
run: echo "artifact-name=build-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: ${{ steps.meta.outputs.artifact-name }}
path: |
build/libs/*.jar
build/reports/detekt/**
build/reports/ktlint/**
build/reports/jacoco/**
build/reports/**
build/test-results/**
build/jacoco/**
retention-days: 7
if-no-files-found: error
copilot-pull-request-reviewer[bot] commented 2026-05-03 10:24:00 +00:00 (Migrated from github.com)
Review

This step runs always() but if-no-files-found is set to error, which can cause the job to fail (or add noisy secondary failures) when the Gradle build fails before producing reports/jars. Consider changing if-no-files-found to warn or only uploading artifacts when expected paths exist.

This step runs `always()` but `if-no-files-found` is set to `error`, which can cause the job to fail (or add noisy secondary failures) when the Gradle build fails before producing reports/jars. Consider changing `if-no-files-found` to `warn` or only uploading artifacts when expected paths exist.
+6 -3
View File
1
@@ -30,13 +30,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Validate Dockerfile
- name: Build image (no push)
if: inputs.push == false
uses: docker/build-push-action@v7
with:
context: .
file: ./Containerfile
call: check
push: false
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Log in to GHCR
if: inputs.push == true
@@ -65,7 +68,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
file: ./Containerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+7 -3
View File
@@ -29,9 +29,13 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
run: |
gh release create "${{ inputs.version }}" \
--generate-notes \
--title "${{ inputs.version }}"
if gh release view "${{ inputs.version }}" >/dev/null 2>&1; then
echo "Release ${{ inputs.version }} already exists. Skipping creation."
else
gh release create "${{ inputs.version }}" \
--generate-notes \
--title "${{ inputs.version }}"
fi
- name: Send Telegram notification
env: