Skip to content

Commit f10c9f5

Browse files
committed
feat: upgrade dependencies and workflows to latest versions
기존 의존성들을 최신 버전으로 업그레이드하고 GitHub Actions 워크플로우를 개선했습니다. 주요 변경사항: - Spotless 플러그인을 5.15.0에서 7.+로 업그레이드 - Gradle 래퍼를 7.2에서 8.14.3으로 업그레이드 - Lombok 플러그인을 6.2.0에서 8.+로 업그레이드 - GitHub Actions에서 Java 11을 Java 21로 업그레이드 - 모든 GitHub Actions을 최신 버전으로 업그레이드: - actions/checkout@v2 → v4 - actions/setup-java@v2 → v4 - docker/*-action@v1/v2 → v3/v5/v6 - semantic-release-action@v2 → v4 - Java 21 호환성을 위해 테스트에 JVM 모듈 열기 플래그 추가 - 코드 포맷팅 규칙에 따라 자동 포맷팅 적용 이러한 업그레이드를 통해 보안성과 성능이 개선되었고, 최신 기능들을 사용할 수 있게 되었습니다.
1 parent 3d4f7f7 commit f10c9f5

File tree

10 files changed

+40
-29
lines changed

10 files changed

+40
-29
lines changed

.github/workflows/ci.yaml

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

1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up JDK 11
16-
uses: actions/setup-java@v2
14+
- uses: actions/checkout@v4
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
1717
with:
18-
java-version: "11"
19-
distribution: "adopt"
18+
java-version: "21"
19+
distribution: "temurin"
2020
- run: gradle build
2121
- run: gradle test

.github/workflows/discord-notification.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
issues: write
1616
pull-requests: write
1717
steps:
18-
- uses: "Ilshidur/[email protected].0"
18+
- uses: "Ilshidur/[email protected].2"
1919
env:
2020
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
2121
if: ${{ github.event_name == 'pull_request' }}
@@ -24,7 +24,7 @@ jobs:
2424
A new PR {{ EVENT_PAYLOAD.pull_request.title }}
2525
by {{ EVENT_PAYLOAD.sender.login}}
2626
at {{ EVENT_PAYLOAD.pull_request.html_url }}
27-
- uses: "Ilshidur/[email protected].0"
27+
- uses: "Ilshidur/[email protected].2"
2828
env:
2929
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
3030
if: ${{ github.event_name == 'issues' }}

.github/workflows/release.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
new_release_notes: ${{ steps.semantic.outputs.new_release_notes }}
2626

2727
steps:
28-
- uses: actions/checkout@v2
29-
- name: Set up JDK 11
30-
uses: actions/setup-java@v2
28+
- uses: actions/checkout@v4
29+
- name: Set up JDK 21
30+
uses: actions/setup-java@v4
3131
with:
32-
java-version: "11"
33-
distribution: "adopt"
32+
java-version: "21"
33+
distribution: "temurin"
3434
- run: gradle build test
35-
- uses: cycjimmy/semantic-release-action@v2
35+
- uses: cycjimmy/semantic-release-action@v4
3636
id: semantic
3737
with:
38-
semantic_version: 17
38+
semantic_version: 24
3939
extra_plugins: |
4040
@google/semantic-release-replace-plugin
4141
@semantic-release/git
@@ -59,10 +59,10 @@ jobs:
5959
if: ${{ needs.release.outputs.new_release_published == 'true' }}
6060

6161
steps:
62-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@v4
6363
- name: Docker meta
6464
id: docker_meta
65-
uses: docker/metadata-action@v3
65+
uses: docker/metadata-action@v5
6666
with:
6767
images: ghcr.io/codingpot/github-org-member-manage-action
6868
tags: |
@@ -72,22 +72,22 @@ jobs:
7272
type=raw,value=latest
7373
7474
- name: Set up QEMU
75-
uses: docker/setup-qemu-action@v1
75+
uses: docker/setup-qemu-action@v3
7676
with:
7777
platforms: all
7878

7979
- name: Set up Docker Buildx
80-
uses: docker/setup-buildx-action@v1
80+
uses: docker/setup-buildx-action@v3
8181

8282
- name: Login to GitHub Container Registry
83-
uses: docker/login-action@v1
83+
uses: docker/login-action@v3
8484
with:
8585
registry: ghcr.io
8686
username: ${{ github.repository_owner }}
8787
password: ${{ secrets.GITHUB_TOKEN }}
8888

8989
- name: Build and push
90-
uses: docker/build-push-action@v2
90+
uses: docker/build-push-action@v6
9191
with:
9292
context: .
9393
file: Dockerfile.build

app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application'
3-
id 'io.freefair.lombok' version '6.2.0'
3+
id 'io.freefair.lombok' version '8.+'
44
}
55

66
repositories {
@@ -33,6 +33,9 @@ application {
3333

3434
test {
3535
useJUnitPlatform()
36+
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED',
37+
'--add-opens', 'java.base/java.util=ALL-UNNAMED',
38+
'--add-opens', 'java.base/java.util.concurrent=ALL-UNNAMED'
3639
}
3740

3841
jar {

app/src/main/java/com/github/codingpot/github_org_member_manage_action/config/Diff.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
public class Diff {
1111
/** Owners to be added. */
1212
private Set<String> newAdmins;
13+
1314
/** Members to be added. */
1415
private Set<String> newMembers;
16+
1517
/** Members to be removed from the org. */
1618
private Set<String> membersToBeDeleted;
1719
}

app/src/main/java/com/github/codingpot/github_org_member_manage_action/status/Status.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
public class Status {
99
/** Contains the type of the Status. */
1010
StatusType type;
11+
1112
/** This should be only populated when {@link #type} is not {@link StatusType#OK}. */
1213
Optional<String> errorMessage;
1314

app/src/test/java/com/github/codingpot/github_org_member_manage_action/github/GitHubServiceV3ImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void setUp() throws IOException {
2222
final GitHub gitHub =
2323
new GitHubBuilder().withOAuthToken(System.getenv("INPUT_GH_TOKEN")).build();
2424
GHOrganization ghOrg = gitHub.getOrganization("codingpot");
25-
service = new GitHubServiceV3Impl(ghOrg, gitHub, /*isDryRun=*/ false);
25+
service = new GitHubServiceV3Impl(ghOrg, gitHub, /* isDryRun= */ false);
2626
}
2727

2828
@Test

build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
plugins { id("com.diffplug.spotless") version "5.15.0" }
1+
plugins {
2+
id("com.diffplug.spotless") version "7.+"
3+
id("com.github.ben-manes.versions") version "+"
4+
}
5+
6+
repositories { mavenCentral() }
27

38
spotless {
49
java {
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.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015-2021 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
3232
# Busybox and similar reduced shells will NOT work, because this script
3333
# requires all of these POSIX shell features:
3434
# * functions;
35-
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36-
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37-
# * compound commands having a testable exit status, especially «case»;
38-
# * various built-in commands including «command», «set», and «ulimit».
35+
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36+
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37+
# * compound commands having a testable exit status, especially «case»;
38+
# * various built-in commands including «command», «set», and «ulimit».
3939
#
4040
# Important for patching:
4141
#

0 commit comments

Comments
 (0)