返回 DeepSeek-Reasonix
cache-impact.yml
根目录 / .github / workflows / cache-impact.yml
1 name: Cache impact guard
2
3 on:
4 pull_request_target:
5 branches: [main-v2]
6 types: [opened, synchronize, reopened, edited, ready_for_review]
7 # The guard only cares about the prompt/tool surfaces listed in
8 # scripts/check-cache-impact.sh; PRs confined to clearly unrelated paths
9 # can never trip it, so skip the run entirely. Keep the ignore list
10 # conservative: when in doubt, run.
11 paths-ignore:
12 - 'docs/**'
13 - 'release-notes/**'
14 - 'benchmarks/**'
15 - 'npm/**'
16 - '*.md'
17
18 permissions:
19 contents: read
20 pull-requests: read
21
22 concurrency:
23 group: cache-impact-${{ github.event.pull_request.number }}
24 cancel-in-progress: true
25
26 jobs:
27 cache-impact:
28 runs-on: ubuntu-latest
29 steps:
30 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
31 with:
32 ref: ${{ github.event.pull_request.base.sha }}
33
34 - name: Collect PR changed files
35 env:
36 GH_TOKEN: ${{ github.token }}
37 PR_NUMBER: ${{ github.event.pull_request.number }}
38 REPOSITORY: ${{ github.repository }}
39 run: |
40 gh api --paginate "repos/${REPOSITORY}/pulls/${PR_NUMBER}/files" \
41 --jq '.[].filename' > "$RUNNER_TEMP/cache-impact-files.txt"
42
43 - name: Check cache-sensitive PR metadata
44 env:
45 PR_BODY: ${{ github.event.pull_request.body }}
46 CACHE_IMPACT_CHANGED_FILES_FILE: ${{ runner.temp }}/cache-impact-files.txt
47 run: bash scripts/check-cache-impact.sh
48
48 lines YAML