Skip to content

Commit 2f74784

Browse files
DanMeonclaude
andcommitted
ci: 변경 감지를 dorny/paths-filter → bash + git diff 로 전환
변경사항: - dorny/paths-filter@v4 제거 — third-party JS action 의존성 1개 감소 - bash + git diff --name-only ...HEAD | grep -qvE 패턴 (uv/ruff 표준) 으로 교체 - negation 의 OR 결합 함정 회피 (.md 파일이 code=true 로 오판되던 동작 정정) - base SHA 부재 / zero SHA 시 code=true fallback (안전 측면, 전체 실행) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f91c905 commit 2f74784

2 files changed

Lines changed: 36 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,33 @@ concurrency:
1919
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2020

2121
jobs:
22-
# * 코드 변경 감지 — docs/*.md / LICENSE / .gitignore 만 변경되면 test job 들이
23-
# if-skip (status: success). predicate-quantifier: every 라 모든 변경 파일이
24-
# exclusion 패턴에 다 해당해야 code:false (= docs-only commit).
22+
# * 코드 변경 감지 — docs / LICENSE / .gitignore 전용 변경이면 test 잡 if-skip
23+
# (status: success). 모든 변경 파일이 exclude 패턴에 매치돼야 code=false.
24+
# base SHA 부재 / zero SHA 면 안전 측면으로 code=true (= 전체 실행).
2525
changes:
2626
name: Detect code changes
2727
runs-on: ubuntu-latest
2828
outputs:
2929
code: ${{ steps.filter.outputs.code }}
3030
steps:
3131
- uses: actions/checkout@v6
32-
- uses: dorny/paths-filter@v4
33-
id: filter
34-
with:
35-
predicate-quantifier: every
36-
filters: |
37-
code:
38-
- '!**.md'
39-
- '!docs/**'
40-
- '!LICENSE*'
41-
- '!.gitignore'
32+
with:
33+
fetch-depth: 0
34+
- id: filter
35+
env:
36+
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
37+
run: |
38+
if [ -z "$BASE_SHA" ] || [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then
39+
echo "code=true" >> "$GITHUB_OUTPUT"
40+
exit 0
41+
fi
42+
# ^ three-dot diff = base..HEAD 공통 조상부터의 변경만 (PR diff 와 동일)
43+
if git diff --name-only "$BASE_SHA"...HEAD \
44+
| grep -qvE '(^|/)([^/]+\.md|LICENSE[^/]*|\.gitignore)$|^docs/'; then
45+
echo "code=true" >> "$GITHUB_OUTPUT"
46+
else
47+
echo "code=false" >> "$GITHUB_OUTPUT"
48+
fi
4249
4350
# * Linux abi3 wheel 1회 빌드 → 모든 Linux 잡(test×4 / slow / core-only)이 공유
4451
# abi3-py310 이라 py3.10/3.11/3.12/3.13 가 동일 wheel 재사용 가능.

.github/workflows/codeql.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,23 @@ jobs:
2222
code: ${{ steps.filter.outputs.code }}
2323
steps:
2424
- uses: actions/checkout@v6
25-
- uses: dorny/paths-filter@v4
26-
id: filter
2725
with:
28-
predicate-quantifier: every
29-
filters: |
30-
code:
31-
- '!**.md'
32-
- '!docs/**'
33-
- '!LICENSE*'
34-
- '!.gitignore'
26+
fetch-depth: 0
27+
- id: filter
28+
env:
29+
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
30+
run: |
31+
if [ -z "$BASE_SHA" ] || [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then
32+
echo "code=true" >> "$GITHUB_OUTPUT"
33+
exit 0
34+
fi
35+
# ^ three-dot: 공통 조상부터의 변경만 (PR diff 와 동일)
36+
if git diff --name-only "$BASE_SHA"...HEAD \
37+
| grep -qvE '(^|/)([^/]+\.md|LICENSE[^/]*|\.gitignore)$|^docs/'; then
38+
echo "code=true" >> "$GITHUB_OUTPUT"
39+
else
40+
echo "code=false" >> "$GITHUB_OUTPUT"
41+
fi
3542
3643
analyze:
3744
name: Analyze

0 commit comments

Comments
 (0)