Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ env:

on:
pull_request:
push:
branches: [ main, develop ]

concurrency:
group: build-${{ github.ref }}
Expand All @@ -15,7 +17,7 @@ jobs:
ci-build:
runs-on: ubuntu-latest

if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
if: ${{ github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}

steps:
- name: Checkout
Expand All @@ -30,10 +32,14 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v2

# 캐시 저장/정리는 job 완료 후 post action 단계에서 수행
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
# 빌드 성공 시 미사용 캐시 엔트리 자동 정리 (default: never)
cache-cleanup: on-success

@coderabbitai coderabbitai Bot Feb 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the actual file to see the context
cat -n .github/workflows/android-ci.yml | sed -n '35,45p'

Repository: YAPP-Github/Reed-Android

Length of output: 714


🏁 Script executed:

# Also check lines 80-90 for the other occurrence mentioned
cat -n .github/workflows/android-ci.yml | sed -n '80,90p'

Repository: YAPP-Github/Reed-Android

Length of output: 662


🌐 Web query:

setup-gradle@v4 cache-cleanup default value documentation

💡 Result:

For gradle/actions/setup-gradle@v4, the cache-cleanup input defaults to on-success (i.e., it only runs cache cleanup when all Gradle builds in the job succeed). You can set it to always or never. [1]

This behavior (and that cache cleanup is enabled by default in v4) is also noted in the v4 deprecation/upgrade guide, where the old boolean gradle-home-cache-cleanup input was replaced by cache-cleanup. [2]

Sources: [1], [2]


cache-cleanup 주석의 기본값을 수정하세요.

setup-gradle@v4 액션의 cache-cleanup 기본값은 on-success이지만, 주석에는 default: never로 잘못 표기되어 있습니다. 두 위치(39-40, 83-84)의 주석을 모두 수정해야 합니다.

수정 방법
-                    # 빌드 성공 시 미사용 캐시 엔트리 자동 정리 (default: never)
+                    # 빌드 성공 시 미사용 캐시 엔트리 자동 정리 (default: on-success)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# 빌드 성공 시 미사용 캐시 엔트리 자동 정리 (default: never)
cache-cleanup: on-success
# 빌드 성공 시 미사용 캐시 엔트리 자동 정리 (default: on-success)
cache-cleanup: on-success
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/android-ci.yml around lines 39 - 40, Update the incorrect
comments for the setup-gradle@v4 action's cache-cleanup option: change the
comment text currently saying "default: never" to the correct "default:
on-success" for both occurrences (the comment near the cache-cleanup: on-success
setting and the second instance further down), ensuring the comment next to the
cache-cleanup key and any explanatory comment blocks reflect the actual default
behavior of setup-gradle@v4.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default값 어디서 어떻게 확인할 수 있어?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@easyhooon GitHub Actions의 default 값을 확인하는 방법은 다음과 같습니다:

1. 액션 저장소의 action.yml 파일 확인

가장 정확한 방법은 해당 액션의 GitHub 저장소에서 action.yml (또는 action.yaml) 파일을 직접 확인하는 것입니다.

setup-gradle@v4의 경우:

여기서 inputs 섹션을 보면 각 파라미터의 default 값이 명시되어 있습니다:

cache-cleanup:
  description: ...
  required: false
  default: 'on-success'

2. 공식 문서 확인

3. 실전 팁

  • GitHub에서 액션 버전을 명시할 때 (예: @v4), 해당 버전의 태그나 릴리스를 찾아가서 확인
  • 액션 사용 시 @ 뒤의 버전/태그/커밋을 클릭하면 해당 시점의 코드로 이동 가능

현재 케이스에서 cache-cleanup의 default 값은 실제로 on-success가 맞습니다! 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default가 on-success면 굳이 설정 코드 남길필요없잖아 주석만 남기고 코드는 지워야겠네

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No description provided.

# PR에서는 캐시 읽기만 허용, push(develop/main)에서만 캐시 갱신하여 용량 절약
cache-read-only: ${{ github.event_name == 'pull_request' }}

- name: Generate local.properties
run: echo '${{ secrets.LOCAL_PROPERTIES }}' | base64 -d > ./local.properties
Expand Down Expand Up @@ -70,10 +76,14 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v2

# 캐시 저장/정리는 job 완료 후 post action 단계에서 수행
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
# 빌드 성공 시 미사용 캐시 엔트리 자동 정리 (default: never)
cache-cleanup: on-success
# PR에서는 캐시 읽기만 허용, push(develop/main)에서만 캐시 갱신하여 용량 절약
cache-read-only: ${{ github.event_name == 'pull_request' }}

- name: Generate local.properties
run: echo '${{ secrets.LOCAL_PROPERTIES }}' | base64 -d > ./local.properties
Expand Down
9 changes: 8 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
org.gradle.parallel=true

# Enable Gradle configuration caching
org.gradle.configuration-cache=true

# Enable Gradle build cache
org.gradle.caching=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
Expand Down