Skip to content

Commit

Permalink
JDK 22 (#59)
Browse files Browse the repository at this point in the history
* JDK 22

* update workflow
  • Loading branch information
SentryMan authored Sep 13, 2024
1 parent 28074f5 commit a4964f6
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
dependencies:
patterns:
- "*"
labels:
- "dependencies"
target-branch: "master"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
commit-message:
prefix: "[workflow]"
labels:
- "dependencies"
target-branch: "master"
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
java_version: [22]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'corretto'
- name: Maven cache
uses: actions/cache@v4
env:
cache-name: maven-cache
with:
path:
~/.m2
key: build-${{ env.cache-name }}
- name: Build with Maven
run: mvn clean test
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Compile/Deploy Native Image To Fly.io
env:
FLY_API_TOKEN: ${{ secrets.FLY_AUTH }}
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
push:
branches: [main]

# Your workflows jobs.
Expand All @@ -22,7 +21,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: "21"
java-version: "22"
java-package: jdk
architecture: x64

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazoncorretto:21-alpine-jdk as jreBuilder
FROM amazoncorretto:22-alpine-jdk as jreBuilder

RUN apk add binutils
RUN jlink \
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<name>MangaBackend</name>
<description>RSocket API for Manga-Spring Site</description>
<properties>
<java.version>21</java.version>
<java.version>22</java.version>
<avaje.inject.version>9.10</avaje.inject.version>
<mainClass>com.mangasite.MangaBackendApplication</mainClass>
<start-class>com.mangasite.MangaBackendApplication</start-class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http)
.httpBasic();
return http.build();
}

// RSocket JWT Security Config
@Bean
public PayloadSocketAcceptorInterceptor rsocketTokenAcceptor(RSocketSecurity security) {
Expand Down

0 comments on commit a4964f6

Please sign in to comment.