Skip to content

Commit 96a7ef1

Browse files
1 parent 13fffde commit 96a7ef1

7 files changed

+53
-8
lines changed

.github/renovate.json

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
{
22
"extends": [
3-
"config:base"
3+
"config:recommended"
4+
],
5+
"addLabels": [
6+
"type: dependency-upgrade"
47
],
5-
"addLabels": ["type: dependency-upgrade"],
68
"schedule": [
7-
"after 10pm every day"
9+
"after 10pm"
810
],
911
"prHourlyLimit": 1,
1012
"prConcurrentLimit": 20,
1113
"timezone": "Europe/Prague",
1214
"packageRules": [
1315
{
14-
"matchPackagePatterns": ["actions.*"],
1516
"dependencyDashboardApproval": true,
16-
"matchUpdateTypes": ["patch"],
17+
"matchUpdateTypes": [
18+
"patch"
19+
],
1720
"matchCurrentVersion": "!/^0/",
18-
"automerge": true
21+
"automerge": true,
22+
"matchPackageNames": [
23+
"/actions.*/"
24+
]
1925
},
2026
{
21-
"matchUpdateTypes": ["patch"],
27+
"matchUpdateTypes": [
28+
"patch"
29+
],
2230
"matchCurrentVersion": "!/^0/",
2331
"automerge": true
2432
}

.github/workflows/gradle.yml

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
PREDICTIVE_TEST_SELECTION: "${{ github.event_name == 'pull_request' && 'true' || 'false' }}"
3131
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
OSS_INDEX_USERNAME: ${{ secrets.OSS_INDEX_USERNAME }}
34+
OSS_INDEX_PASSWORD: ${{ secrets.OSS_INDEX_PASSWORD }}
3335
steps:
3436
# https://github.com/actions/virtual-environments/issues/709
3537
- name: "🗑 Free disk space"
@@ -58,6 +60,11 @@ jobs:
5860
run: |
5961
[ -f ./setup.sh ] && ./setup.sh || [ ! -f ./setup.sh ]
6062
63+
- name: "🚔 Sonatype Scan"
64+
id: sonatypescan
65+
run: |
66+
./gradlew ossIndexAudit --no-parallel --info
67+
6168
- name: "🛠 Build with Gradle"
6269
id: gradle
6370
run: |

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
if: startsWith(github.ref, 'refs/tags/')
147147
steps:
148148
- name: Checkout repository
149-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
149+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
150150
- name: Download artifacts
151151
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
152152
with:

buildSrc/build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
plugins {
22
id 'groovy-gradle-plugin'
33
}
4+
5+
repositories {
6+
mavenCentral()
7+
}
8+
9+
dependencies {
10+
implementation(libs.sonatype.scan)
11+
}

buildSrc/settings.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dependencyResolutionManagement {
2+
versionCatalogs {
3+
libs {
4+
from(files("../gradle/libs.versions.toml"))
5+
}
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
plugins {
22
id "io.micronaut.build.internal.module"
33
id "io.micronaut.build.internal.hibernate-validator-base"
4+
id("org.sonatype.gradle.plugins.scan")
45
}
6+
String ossIndexUsername = System.getenv("OSS_INDEX_USERNAME") ?: project.properties["ossIndexUsername"]
7+
String ossIndexPassword = System.getenv("OSS_INDEX_PASSWORD") ?: project.properties["ossIndexPassword"]
8+
boolean sonatypePluginConfigured = ossIndexUsername != null && ossIndexPassword != null
9+
if (sonatypePluginConfigured) {
10+
ossIndexAudit {
11+
username = ossIndexUsername
12+
password = ossIndexPassword
13+
}
14+
}
15+

gradle/libs.versions.toml

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ managed-hibernate-validator = '8.0.2.Final'
66
micronaut-serde = "2.11.0"
77
micronaut-test = "4.5.0"
88
micronaut-validation = "4.8.0"
9+
sonatype-scan = "3.0.0"
910

1011
[libraries]
1112
# Core
@@ -15,3 +16,6 @@ micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'mi
1516
micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.ref = "micronaut-serde" }
1617
micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" }
1718
hibernate-validator = { module = 'org.hibernate:hibernate-validator', version.ref = 'managed-hibernate-validator' }
19+
20+
21+
sonatype-scan = { module = "org.sonatype.gradle.plugins:scan-gradle-plugin", version.ref = "sonatype-scan" }

0 commit comments

Comments
 (0)