Skip to content

Commit 0a50b78

Browse files
authored
Merge pull request #79 from RADAR-base/release-1.0.6
release-1.0.6
2 parents 089337d + 883d3d5 commit 0a50b78

File tree

8 files changed

+58
-52
lines changed

8 files changed

+58
-52
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
1-
# Continuous integration, including test and integration test
21
name: CI
32

4-
# Run in main and dev branches and in all pull requests to those branches
53
on:
64
push:
75
branches: [ master, dev ]
86
pull_request:
97
branches: [ master, dev ]
108

119
jobs:
12-
# Build and test the code
1310
build:
14-
# The type of runner that the job will run on
1511
runs-on: ubuntu-latest
1612

17-
# Steps represent a sequence of tasks that will be executed as part of the job
1813
steps:
19-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
2115

22-
- uses: actions/setup-java@v3
16+
- uses: actions/setup-java@v5
2317
with:
2418
distribution: temurin
2519
java-version: 17
2620

2721
- name: Setup Gradle
28-
uses: gradle/gradle-build-action@v2
22+
uses: gradle/actions/setup-gradle@v3
2923

30-
# Compile the code
3124
- name: Compile code
3225
run: ./gradlew assemble
3326

34-
# Gradle check
3527
- name: Check
3628
run: ./gradlew check

.github/workflows/release.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,40 @@
1-
# Create release files
21
name: Release
32

43
on:
54
release:
65
types: [ published ]
76

87
env:
9-
DOCKER_IMAGE: radarbase/radar-redcapintegration
8+
REGISTRY: ghcr.io
9+
REPOSITORY: ${{ github.repository }}
10+
IMAGE_NAME: radar-redcapintegration
1011

1112
jobs:
12-
# Build and push tagged release docker image
1313
docker:
14-
# The type of runner that the job will run on
1514
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
1618

17-
# Steps represent a sequence of tasks that will be executed as part of the job
1819
steps:
19-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v5
2021

21-
# Add Docker labels and tags
22-
- name: Docker meta
23-
id: docker_meta
24-
uses: docker/metadata-action@v4
25-
with:
26-
images: ${{ env.DOCKER_IMAGE }}
27-
tags: |
28-
type=semver,pattern={{version}}
29-
type=semver,pattern={{major}}.{{minor}}
30-
31-
- name: Login to DockerHub
22+
- name: Login to Container Registry
3223
uses: docker/login-action@v2
3324
with:
34-
username: ${{ secrets.DOCKERHUB_USERNAME }}
35-
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
registry: ${{ env.REGISTRY }}
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Lowercase image name
30+
run: |
31+
echo "DOCKER_IMAGE=${REGISTRY}/${REPOSITORY,,}/${IMAGE_NAME}" >>${GITHUB_ENV}
3632
3733
- name: Build and push
3834
id: docker_build
39-
uses: docker/build-push-action@v3
35+
uses: docker/build-push-action@v6
4036
with:
41-
# Allow running the image on the architectures supported by openjdk:11-jre-slim
37+
# Allow running the image on the architectures supported by openjdk:17-jre-slim
4238
push: true
4339
tags: ${{ steps.docker_meta.outputs.tags }}
4440
context: .

.github/workflows/scheduled-snyk-docker.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@ on:
66
workflow_dispatch:
77

88
env:
9-
DOCKER_IMAGE: radarbase/radar-redcapintegration
9+
REGISTRY: ghcr.io
10+
REPOSITORY: ${{ github.repository }}
11+
IMAGE_NAME: radar-redcapintegration
1012

1113
jobs:
1214
security:
1315
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
security-events: write
1419

1520
steps:
16-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v5
22+
23+
- name: Lowercase image name
24+
run: |
25+
echo "DOCKER_IMAGE=${REGISTRY}/${REPOSITORY,,}/${IMAGE_NAME}" >>${GITHUB_ENV}
1726
1827
- name: Run Snyk to check for vulnerabilities
1928
continue-on-error: true # To make sure that SARIF upload gets called

.github/workflows/scheduled-snyk.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ on:
88
jobs:
99
security:
1010
runs-on: ubuntu-latest
11+
permissions: write-all
1112

1213
steps:
13-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
1415

1516
- name: Run Snyk to check for vulnerabilities
16-
uses: snyk/actions/gradle-jdk17@master
17+
uses: snyk/actions/gradle-8-jdk17@master
1718
continue-on-error: true # To make sure that SARIF upload gets called
1819
env:
1920
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
@@ -23,7 +24,7 @@ jobs:
2324
--configuration-matching='^runtimeClasspath$'
2425
--fail-on=upgradable
2526
--severity-threshold=high
26-
--policy-path=.snykS
27+
--policy-path=.snyk
2728
--org=radar-base
2829
--sarif-file-output=snyk.sarif
2930

.github/workflows/snyk.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
security:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
1515

1616
- name: Run Snyk to check for vulnerabilities
17-
uses: snyk/actions/gradle-jdk17@master
17+
uses: snyk/actions/gradle-8-jdk17@master
1818
env:
1919
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
2020
with:

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
FROM openjdk:17 as builder
13+
14+
FROM --platform=$BUILDPLATFORM gradle:8.13-jdk17 AS builder
1415

1516
RUN mkdir /code
1617
WORKDIR /code
1718

1819
ENV GRADLE_OPTS -Dorg.gradle.daemon=false
1920

20-
COPY ./gradle/wrapper /code/gradle/wrapper
21-
COPY ./gradlew /code/
22-
RUN ./gradlew --version
23-
2421
COPY ./build.gradle ./settings.gradle /code/
2522

2623
RUN ./gradlew downloadApplicationDependencies

build.gradle

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'checkstyle'
66
id 'jacoco'
77
id 'application'
8-
id 'org.jetbrains.kotlin.jvm' version '1.5.21'
8+
id 'org.jetbrains.kotlin.jvm' version '1.9.25'
99
}
1010

1111
group = 'org.radarbase'
@@ -17,7 +17,7 @@ application {
1717

1818
java {
1919
toolchain {
20-
languageVersion = JavaLanguageVersion.of(11)
20+
languageVersion = JavaLanguageVersion.of(17)
2121
}
2222
}
2323

@@ -64,7 +64,7 @@ configurations {
6464

6565
ext {
6666
apacheCommonsIoVersion = '2.5'
67-
apacheCommonsLangVersion = '3.6'
67+
apacheCommonsLangVersion = '3.18.0'
6868
jerseyVersion = '2.31'
6969
jerseymediaVersion = '2.30.1'
7070
junitVersion = '4.12'
@@ -75,6 +75,15 @@ ext {
7575
jacksonVersion = '2.16.1'
7676
}
7777

78+
configurations.configureEach {
79+
resolutionStrategy {
80+
/* The entries in the block below are added here to force the version of
81+
* transitive dependencies and mitigate reported vulnerabilities */
82+
force("org.apache.commons:commons-lang3:$apacheCommonsLangVersion")
83+
}
84+
}
85+
86+
7887
dependencies {
7988
implementation "ch.qos.logback:logback-classic:$logbackVersion"
8089
runtimeOnly "org.glassfish.jersey.media:jersey-media-json-jackson:$jerseymediaVersion"
@@ -125,12 +134,12 @@ tasks.withType(JavaCompile) {
125134
}
126135

127136
tasks.named('wrapper') {
128-
gradleVersion = '7.4'
137+
gradleVersion = '8.13'
129138
}
130139

131-
tasks.withType(Tar) {
140+
tasks.withType(Tar).configureEach {
132141
compression = Compression.GZIP
133-
extension = "tar"
142+
archiveExtension.set("tar")
134143
}
135144

136145
test {
@@ -199,8 +208,10 @@ tasks.register('copyConf', Copy) {
199208
}
200209
}
201210

211+
212+
202213
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
203214
kotlinOptions {
204-
jvmTarget = "11"
215+
jvmTarget = "17"
205216
}
206217
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)