diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index 5ae0abd..85f13f3 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -15,7 +15,11 @@ jobs: steps: - name: Check branch name run: | - if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]] || [[ "${{ github.ref }}" =~ ^refs/heads/release/v.*$ ]] || [[ "${{ github.ref }}" =~ ^refs/heads/bug/.*$ ]] ; then + if [[ "${{ github.ref }}" == "refs/heads/main" ]] || \ + [[ "${{ github.ref }}" =~ ^refs/heads/feature/.*$ ]] || \ + [[ "${{ github.ref }}" =~ ^refs/heads/release/v.*$ ]] || \ + [[ "${{ github.ref }}" =~ ^refs/heads/bug/.*$ ]] || \ + [[ "${{ github.ref }}" == "refs/heads/renovate/all-dependencies" ]] ; then echo "Branch naming is correct!" else echo "Invalid branch name! Correct format: 'feature/' or 'bug/' or release/vx.x.x" diff --git a/.github/workflows/leanix-github-agent-code-coverage.yml b/.github/workflows/leanix-github-agent-code-coverage.yml index 6198d94..af5005c 100644 --- a/.github/workflows/leanix-github-agent-code-coverage.yml +++ b/.github/workflows/leanix-github-agent-code-coverage.yml @@ -44,7 +44,7 @@ jobs: - name: Add coverage to PR id: jacoco - uses: madrapps/jacoco-report@v1.3 + uses: madrapps/jacoco-report@94dfcf8dae9680be2cfa714ca37fb37790bd7663 # v1.6 with: paths: ${{ github.workspace }}/build/jacocoXml/jacocoTestReport.xml token: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/publish-dev-docker-image.yml b/.github/workflows/publish-dev-docker-image.yml index 998222a..b0cde32 100644 --- a/.github/workflows/publish-dev-docker-image.yml +++ b/.github/workflows/publish-dev-docker-image.yml @@ -39,7 +39,7 @@ jobs: arguments: build - name: Log in to the Container registry - uses: docker/login-action@v3.2.0 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -47,13 +47,13 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image id: push - uses: docker/build-push-action@v5.3.0 + uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0 with: context: . push: true diff --git a/.github/workflows/publish-package-to-ghcr.yml b/.github/workflows/publish-package-to-ghcr.yml index 55d35b7..caef461 100644 --- a/.github/workflows/publish-package-to-ghcr.yml +++ b/.github/workflows/publish-package-to-ghcr.yml @@ -105,7 +105,7 @@ jobs: arguments: build - name: Log in to the Container registry - uses: docker/login-action@v3.2.0 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 if: (steps.tag-action.outputs.tag != '') with: registry: ${{ env.REGISTRY }} @@ -114,14 +114,14 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 if: (steps.tag-action.outputs.tag != '') with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image id: push - uses: docker/build-push-action@v5.3.0 + uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0 if: (steps.tag-action.outputs.tag != '') with: context: . diff --git a/Dockerfile b/Dockerfile index f47e992..6735c30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/x86_64 eclipse-temurin:21-jre-alpine +FROM --platform=linux/x86_64 eclipse-temurin:21.0.8_9-jre-alpine@sha256:990397e0495ac088ab6ee3d949a2e97b715a134d8b96c561c5d130b3786a489d RUN apk --no-cache upgrade && apk --no-cache add curl ca-certificates diff --git a/build.gradle.kts b/build.gradle.kts index 8f52831..81b221a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,12 @@ import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask plugins { - id("org.springframework.boot") version "3.4.3" - id("io.spring.dependency-management") version "1.1.5" - id("com.expediagroup.graphql") version "8.3.0" - id("io.gitlab.arturbosch.detekt") version "1.23.7" - kotlin("jvm") version "2.0.10" - kotlin("plugin.spring") version "2.0.10" + id("org.springframework.boot") version "3.5.7" + id("io.spring.dependency-management") version "1.1.7" + id("com.expediagroup.graphql") version "8.8.1" + id("io.gitlab.arturbosch.detekt") version "1.23.8" + kotlin("jvm") version "2.0.21" + kotlin("plugin.spring") version "2.0.21" jacoco } @@ -23,7 +23,7 @@ repositories { mavenCentral() } -extra["springCloudVersion"] = "2024.0.0" +extra["springCloudVersion"] = "2025.0.0" dependencyManagement { imports { @@ -36,22 +36,22 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-aop") implementation("org.springframework.boot:spring-boot-starter-actuator") implementation("org.springframework.boot:spring-boot-starter-cache") - implementation("com.github.ben-manes.caffeine:caffeine:2.8.8") - implementation("org.springframework.cloud:spring-cloud-starter-openfeign:4.1.4") + implementation("com.github.ben-manes.caffeine:caffeine:2.9.3") + implementation("org.springframework.cloud:spring-cloud-starter-openfeign:4.3.0") implementation("org.springframework.boot:spring-boot-starter-websocket") implementation("io.github.resilience4j:resilience4j-spring-boot3") implementation("org.jetbrains.kotlin:kotlin-reflect") - implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.1") - implementation("com.expediagroup:graphql-kotlin-spring-client:8.3.0") - developmentOnly("io.netty:netty-resolver-dns-native-macos:4.1.85.Final") { + implementation("com.fasterxml.jackson.core:jackson-annotations:2.20") + implementation("com.expediagroup:graphql-kotlin-spring-client:8.8.1") + developmentOnly("io.netty:netty-resolver-dns-native-macos:4.2.7.Final") { artifact { classifier = "osx-aarch_64" } } // Dependencies for generating JWT token - implementation("io.jsonwebtoken:jjwt-impl:0.11.2") - implementation("io.jsonwebtoken:jjwt-jackson:0.11.2") + implementation("io.jsonwebtoken:jjwt-impl:0.13.0") + implementation("io.jsonwebtoken:jjwt-jackson:0.13.0") testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("com.ninja-squad:springmockk:4.0.2"){ @@ -83,7 +83,7 @@ detekt { parallel = true buildUponDefaultConfig = true dependencies { - detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.7") + detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.8") } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a441313..d4081da 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/kotlin/net/leanix/githubagent/services/WebhookEventService.kt b/src/main/kotlin/net/leanix/githubagent/services/WebhookEventService.kt index 52f6b4b..4764123 100644 --- a/src/main/kotlin/net/leanix/githubagent/services/WebhookEventService.kt +++ b/src/main/kotlin/net/leanix/githubagent/services/WebhookEventService.kt @@ -135,7 +135,9 @@ class WebhookEventService( defaultBranch: String? ) { val location = getManifestFileLocation(manifestFilePath) - logger.info("Manifest file ${ManifestFileAction.REMOVED} from repository $repositoryFullName under $location") + logger.info( + " Manifest file ${ManifestFileAction.REMOVED} from repository $repositoryFullName under $location" + ) webSocketService.sendMessage( "/events/manifestFile", ManifestFileUpdateDto(