Skip to content

Commit 2b8093b

Browse files
author
Takahashi.Hiroyuki
committed
GitHub Actions 高速化:差分のみチェックするように
1 parent ea04da8 commit 2b8093b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/java-format-check.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout repository
2323
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
2426

2527
- name: Validate Gradle Wrapper
2628
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0
@@ -35,4 +37,9 @@ jobs:
3537
run: chmod +x gradlew
3638

3739
- name: Run Spotless Check
38-
run: ./gradlew spotlessCheck --no-daemon
40+
run: |
41+
if [ -n "${{github.base_ref}}" ]; then
42+
./gradlew spotlessCheck --no-daemon -PdiffBase=origin/${{github.base_ref}}
43+
else
44+
./gradlew spotlessCheck --no-daemon
45+
fi

0 commit comments

Comments
 (0)