Skip to content

Commit 26fc62b

Browse files
committed
refactor: simplify pre-commit workflow and update welcome message
1 parent 5c3a5ee commit 26fc62b

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ jobs:
1111
name: Pre-commit Checks (JDK ${{ matrix.java-version }})
1212
runs-on: ubuntu-latest
1313

14-
strategy:
15-
matrix:
16-
java-version: [21, 25]
17-
fail-fast: false
18-
1914
permissions:
2015
contents: read
2116
pull-requests: write
@@ -27,11 +22,11 @@ jobs:
2722
with:
2823
fetch-depth: 0
2924

30-
- name: Set up JDK ${{ matrix.java-version }}
25+
- name: Set up JDK
3126
uses: actions/setup-java@v5
3227
with:
3328
distribution: temurin
34-
java-version: ${{ matrix.java-version }}
29+
java-version: 25
3530
cache: gradle
3631

3732
- name: Setup Gradle
@@ -82,13 +77,13 @@ jobs:
8277
issue_number: context.issue.number,
8378
owner: context.repo.owner,
8479
repo: context.repo.repo,
85-
body: `❌ Pre-commit checks failed for JDK ${{ matrix.java-version }}. Please check the workflow run for details.`
80+
body: `❌ Pre-commit checks failed for JDK 25. Please check the workflow run for details.`
8681
});
8782
} else if (result === 'success') {
8883
github.rest.issues.createComment({
8984
issue_number: context.issue.number,
9085
owner: context.repo.owner,
9186
repo: context.repo.repo,
92-
body: `✅ Pre-commit checks passed for JDK ${{ matrix.java-version }}!`
87+
body: `✅ Pre-commit checks passed!`
9388
});
9489
}

src/main/java/org/example/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private Main() {}
1313

1414
static void main() {
1515

16-
IO.println(String.format("Hello and welcome!"));
16+
IO.println(String.format("Hello, welcome!"));
1717

1818
for (int i = 1; i <= 5; i++) {
1919
IO.println("i = " + i);

0 commit comments

Comments
 (0)