Skip to content

Commit a4964f6

Browse files
authored
JDK 22 (#59)
* JDK 22 * update workflow
1 parent 28074f5 commit a4964f6

File tree

7 files changed

+90
-5
lines changed

7 files changed

+90
-5
lines changed

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
groups:
9+
dependencies:
10+
patterns:
11+
- "*"
12+
labels:
13+
- "dependencies"
14+
target-branch: "master"
15+
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
20+
open-pull-requests-limit: 5
21+
commit-message:
22+
prefix: "[workflow]"
23+
labels:
24+
- "dependencies"
25+
target-branch: "master"

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
permissions:
9+
contents: read
10+
packages: write
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
java_version: [22]
15+
os: [ubuntu-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Java
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: ${{ matrix.java_version }}
23+
distribution: 'corretto'
24+
- name: Maven cache
25+
uses: actions/cache@v4
26+
env:
27+
cache-name: maven-cache
28+
with:
29+
path:
30+
~/.m2
31+
key: build-${{ env.cache-name }}
32+
- name: Build with Maven
33+
run: mvn clean test
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Approve a PR
19+
run: gh pr review --approve "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
- name: Enable auto-merge for Dependabot PRs
24+
run: gh pr merge --auto --merge "$PR_URL"
25+
env:
26+
PR_URL: ${{github.event.pull_request.html_url}}
27+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Compile/Deploy Native Image To Fly.io
33
env:
44
FLY_API_TOKEN: ${{ secrets.FLY_AUTH }}
55
on:
6-
# Triggers the workflow on push or pull request events but only for the main branch
7-
pull_request:
6+
push:
87
branches: [main]
98

109
# Your workflows jobs.
@@ -22,7 +21,7 @@ jobs:
2221
- name: Setup Java
2322
uses: actions/setup-java@v1
2423
with:
25-
java-version: "21"
24+
java-version: "22"
2625
java-package: jdk
2726
architecture: x64
2827

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM amazoncorretto:21-alpine-jdk as jreBuilder
1+
FROM amazoncorretto:22-alpine-jdk as jreBuilder
22

33
RUN apk add binutils
44
RUN jlink \

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<name>MangaBackend</name>
1414
<description>RSocket API for Manga-Spring Site</description>
1515
<properties>
16-
<java.version>21</java.version>
16+
<java.version>22</java.version>
1717
<avaje.inject.version>9.10</avaje.inject.version>
1818
<mainClass>com.mangasite.MangaBackendApplication</mainClass>
1919
<start-class>com.mangasite.MangaBackendApplication</start-class>

src/main/java/com/mangasite/security/ServerSecurityConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http)
3030
.httpBasic();
3131
return http.build();
3232
}
33+
3334
// RSocket JWT Security Config
3435
@Bean
3536
public PayloadSocketAcceptorInterceptor rsocketTokenAcceptor(RSocketSecurity security) {

0 commit comments

Comments
 (0)