Skip to content

Commit db47065

Browse files
authored
Merge pull request #565 from RADAR-base/release-3.0.3
release-3.0.3
2 parents 4a7a3c7 + a790d52 commit db47065

File tree

10 files changed

+108
-95
lines changed

10 files changed

+108
-95
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ on:
99
branches: [ main, dev ]
1010

1111
env:
12-
DOCKER_IMAGE: radarbase/radar-output-restructure
12+
REGISTRY: ghcr.io
13+
REPOSITORY: ${{ github.repository }}
14+
IMAGE_NAME: radar-output-restructure
1315

1416
jobs:
15-
# Build and test the code
1617
build:
17-
# The type of runner that the job will run on
1818
runs-on: ubuntu-latest
1919

20-
# Steps represent a sequence of tasks that will be executed as part of the job
2120
steps:
22-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2321
- uses: actions/checkout@v3
2422

2523
- uses: actions/setup-java@v3
@@ -28,7 +26,7 @@ jobs:
2826
java-version: 17
2927

3028
- name: Setup Gradle
31-
uses: gradle/gradle-build-action@v2
29+
uses: gradle/actions/setup-gradle@v3
3230

3331
# Compile the code
3432
- name: Compile code
@@ -47,13 +45,17 @@ jobs:
4745

4846
# Check that the docker image builds correctly
4947
docker:
50-
# The type of runner that the job will run on
5148
runs-on: ubuntu-latest
5249

53-
# Steps represent a sequence of tasks that will be executed as part of the job
5450
steps:
55-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
56-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
52+
53+
# Setup docker build environment
54+
- name: Set up QEMU
55+
uses: docker/setup-qemu-action@v3
56+
57+
- name: Set up Docker Buildx
58+
uses: docker/setup-buildx-action@v3
5759

5860
- name: Cache Docker layers
5961
uses: actions/cache@v3
@@ -63,27 +65,25 @@ jobs:
6365
restore-keys: |
6466
${{ runner.os }}-buildx-
6567
68+
- name: Login to Container Registry
69+
uses: docker/login-action@v2
70+
with:
71+
registry: ${{ env.REGISTRY }}
72+
username: ${{ github.actor }}
73+
password: ${{ secrets.GITHUB_TOKEN }}
74+
75+
- name: Lowercase image name
76+
run: |
77+
echo "DOCKER_IMAGE=${REGISTRY}/${REPOSITORY,,}/${IMAGE_NAME}" >>${GITHUB_ENV}
78+
6679
# Add Docker labels and tags
6780
- name: Docker meta
6881
id: docker_meta
69-
uses: docker/metadata-action@v4
82+
uses: docker/metadata-action@v5
7083
with:
7184
images: ${{ env.DOCKER_IMAGE }}
7285

73-
- name: Login to Docker Hub
74-
uses: docker/login-action@v2
75-
with:
76-
username: ${{ secrets.DOCKERHUB_USERNAME }}
77-
password: ${{ secrets.DOCKERHUB_TOKEN }}
78-
79-
# Setup docker build environment
80-
- name: Set up QEMU
81-
uses: docker/setup-qemu-action@v2
82-
83-
- name: Set up Docker Buildx
84-
uses: docker/setup-buildx-action@v2
85-
86-
- name: Build
86+
- name: Build docker image and push
8787
uses: docker/build-push-action@v3
8888
with:
8989
context: .
@@ -95,8 +95,8 @@ jobs:
9595
# Use runtime labels from docker_meta as well as fixed labels
9696
labels: |
9797
${{ steps.docker_meta.outputs.labels }}
98-
maintainer=Bastiaan de Graaf <bastiaan@thehyve.nl>
99-
org.opencontainers.image.authors=Bastiaan de Graaf <bastiaan@thehyve.nl>
98+
maintainer=Pim van Nierop <pim@thehyve.nl>
99+
org.opencontainers.image.authors=Pim van Nierop <pim@thehyve.nl>
100100
org.opencontainers.image.vendor=RADAR-base
101101
org.opencontainers.image.licenses=Apache-2.0
102102

.github/workflows/publish_snapshots.yml renamed to .github/workflows/publish-snapshots.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,18 @@ on:
99
jobs:
1010
# Build and test the code
1111
build:
12-
# The type of runner that the job will run on
1312
runs-on: ubuntu-latest
1413

15-
# Steps represent a sequence of tasks that will be executed as part of the job
1614
steps:
17-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
18-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1916

20-
- uses: actions/setup-java@v3
17+
- uses: actions/setup-java@v4
2118
with:
2219
distribution: temurin
2320
java-version: 17
2421

2522
- name: Setup Gradle
26-
uses: gradle/gradle-build-action@v2
23+
uses: gradle/actions/setup-gradle@v3
2724

2825
- name: Has SNAPSHOT version
2926
id: is-snapshot
@@ -37,6 +34,6 @@ jobs:
3734
3835
- name: Publish
3936
env:
40-
OSSRH_USER: ${{ secrets.OSSRH_USER }}
41-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
37+
OSSRH_USER: ${{ secrets.OSSRH_USER_TOKEN_ID }}
38+
OSSRH_PASSWORD: ${{ secrets.OSSRH_USER_TOKEN_SECRET }}
4239
run: ./gradlew -Psigning.gnupg.keyName=${{ secrets.OSSRH_GPG_SECRET_KEY_NAME }} -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} publish

.github/workflows/release.yml

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

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

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

1112
jobs:
1213
upload:
13-
# The type of runner that the job will run on
1414
runs-on: ubuntu-latest
15+
permissions: write-all
1516

16-
# Steps represent a sequence of tasks that will be executed as part of the job
1717
steps:
18-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2019

21-
- uses: actions/setup-java@v3
20+
- uses: actions/setup-java@v4
2221
with:
2322
distribution: temurin
2423
java-version: 17
2524

2625
- name: Setup Gradle
27-
uses: gradle/gradle-build-action@v2
26+
uses: gradle/actions/setup-gradle@v3
2827

2928
# Compile code
3029
- name: Compile code
3130
run: ./gradlew assemble
3231

3332
# Upload it to GitHub
3433
- name: Upload to GitHub
35-
uses: AButler/upload-release-assets@v2.0
34+
uses: AButler/upload-release-assets@v3.0
3635
with:
3736
files: 'build/libs/*;build/distributions/*'
3837
repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -44,44 +43,51 @@ jobs:
4443
4544
- name: Publish
4645
env:
47-
OSSRH_USER: ${{ secrets.OSSRH_USER }}
48-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
46+
OSSRH_USER: ${{ secrets.OSSRH_USER_TOKEN_ID }}
47+
OSSRH_PASSWORD: ${{ secrets.OSSRH_USER_TOKEN_SECRET }}
4948
run: ./gradlew -Psigning.gnupg.keyName=${{ secrets.OSSRH_GPG_SECRET_KEY_NAME }} -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} publish closeAndReleaseSonatypeStagingRepository
5049

5150
# Build and push tagged release docker image
5251
docker:
53-
# The type of runner that the job will run on
5452
runs-on: ubuntu-latest
53+
permissions:
54+
contents: read
55+
packages: write
5556

56-
# Steps represent a sequence of tasks that will be executed as part of the job
5757
steps:
58-
- uses: actions/checkout@v3
58+
- uses: actions/checkout@v4
59+
60+
# Setup docker build environment
61+
- name: Set up QEMU
62+
uses: docker/setup-qemu-action@v3
63+
64+
- name: Set up Docker Buildx
65+
uses: docker/setup-buildx-action@v3
66+
67+
- name: Login to Container Registry
68+
uses: docker/login-action@v2
69+
with:
70+
registry: ${{ env.REGISTRY }}
71+
username: ${{ github.actor }}
72+
password: ${{ secrets.GITHUB_TOKEN }}
73+
74+
- name: Lowercase image name
75+
run: |
76+
echo "DOCKER_IMAGE=${REGISTRY}/${REPOSITORY,,}/${IMAGE_NAME}" >>${GITHUB_ENV}
5977
6078
# Add Docker labels and tags
6179
- name: Docker meta
6280
id: docker_meta
63-
uses: docker/metadata-action@v4
81+
uses: docker/metadata-action@v5
6482
with:
6583
images: ${{ env.DOCKER_IMAGE }}
6684
# output 2.1.2, 2.1 and 2
6785
tags: |
6886
type=semver,pattern={{version}}
6987
type=semver,pattern={{major}}.{{minor}}
7088
71-
# Setup docker build environment
72-
- name: Set up QEMU
73-
uses: docker/setup-qemu-action@v2
74-
- name: Set up Docker Buildx
75-
uses: docker/setup-buildx-action@v2
76-
77-
- name: Login to DockerHub
78-
uses: docker/login-action@v2
79-
with:
80-
username: ${{ secrets.DOCKERHUB_USERNAME }}
81-
password: ${{ secrets.DOCKERHUB_TOKEN }}
82-
8389
- name: Build and push
84-
uses: docker/build-push-action@v3
90+
uses: docker/build-push-action@v6
8591
with:
8692
context: .
8793
file: ./Dockerfile
@@ -91,21 +97,12 @@ jobs:
9197
# Use runtime labels from docker_meta as well as fixed labels
9298
labels: |
9399
${{ steps.docker_meta.outputs.labels }}
94-
maintainer=Bastiaan de Graaf <bastiaan@thehyve.nl>
95-
org.opencontainers.image.authors=Bastiaan de Graaf <bastiaan@thehyve.nl>
100+
maintainer=Pim van Nierop <pim@thehyve.nl>
101+
org.opencontainers.image.authors=Pim van Nierop <pim@thehyve.nl>
96102
org.opencontainers.image.vendor=RADAR-base
97103
org.opencontainers.image.licenses=Apache-2.0
98104
99-
- name: Build locally
100-
uses: docker/build-push-action@v3
101-
with:
102-
context: .
103-
file: ./Dockerfile
104-
platforms: linux/amd64
105-
load: true
106-
tags: ${{ steps.docker_meta.outputs.tags }}
107-
108-
- name: Inspect image
105+
- name: Inspect docker image
109106
run: |
107+
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
110108
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
111-
docker run --rm ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} --help

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

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

88
env:
9-
DOCKER_IMAGE: radarbase/radar-output-restructure
9+
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/radar-output-restructure
1010

1111
jobs:
1212
security:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
security-events: write
1417

1518
steps:
16-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1720

1821
- name: Run Snyk to check for vulnerabilities
1922
continue-on-error: true # To make sure that SARIF upload gets called

.github/workflows/scheduled-snyk.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ on:
88
jobs:
99
security:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
security-events: write
1114

1215
steps:
13-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1417

1518
- name: Run Snyk to check for vulnerabilities
16-
uses: snyk/actions/gradle-jdk17@master
19+
uses: snyk/actions/gradle-8-jdk17@master
1720
continue-on-error: true # To make sure that SARIF upload gets called
1821
env:
1922
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.github/workflows/snyk.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
FROM --platform=$BUILDPLATFORM gradle:8.4-jdk17 AS builder
13+
FROM --platform=$BUILDPLATFORM gradle:8.13-jdk17 AS builder
1414

1515
RUN mkdir /code
1616
WORKDIR /code

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ configurations["integrationTestRuntimeOnly"].extendsFrom(
5353
configurations.testRuntimeOnly.get(),
5454
)
5555

56+
configurations.all {
57+
resolutionStrategy {
58+
/* The entries in the block below are added here to force the version of
59+
* transitive dependencies and mitigate reported vulnerabilities */
60+
force(
61+
"com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}",
62+
"io.netty:netty-codec-http:${Versions.netty}",
63+
"io.projectreactor.netty:reactor-netty-http:${Versions.projectReactorNetty}",
64+
"org.apache.commons:commons-lang3:3.18.0",
65+
)
66+
}
67+
}
68+
5669
dependencies {
5770
api("org.apache.avro:avro:${Versions.avro}")
5871
runtimeOnly("org.xerial.snappy:snappy-java:${Versions.snappy}")

0 commit comments

Comments
 (0)