File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,7 @@ max_concurrency = 4
66# Check link anchors
77include_fragments = true
88
9- # excluding links to pull requests and issues is done for performance
10- # sonatype snapshots are currrently unbrowseable
119exclude = [
10+ # excluding links to pull requests and issues is done for performance
1211 " ^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\ d+$" ,
13- ' ^https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/opentelemetry/contrib/$' ,
1412]
15-
16-
Original file line number Diff line number Diff line change @@ -33,14 +33,27 @@ jobs:
3333 echo "files=$modified_files" >> $GITHUB_OUTPUT
3434 echo "Modified files: $modified_files"
3535
36+ - name : Check if lychee config was modified
37+ if : github.event_name == 'pull_request'
38+ id : config-check
39+ run : |
40+ merge_base=$(git merge-base origin/${{ github.base_ref }} HEAD)
41+ config_modified=$(git diff --name-only $merge_base...${{ github.event.pull_request.head.sha }} \
42+ | grep -E '\.github/scripts/(lychee-config\.toml|link-check\.sh|dependencies\.Dockerfile)$' || true)
43+ if [ -n "$config_modified" ]; then
44+ echo "modified=true" >> $GITHUB_OUTPUT
45+ else
46+ echo "modified=false" >> $GITHUB_OUTPUT
47+ fi
48+
3649 - name : Link check - all links (modified files only)
3750 if : github.event_name == 'pull_request' && steps.modified-files.outputs.files != ''
3851 env :
3952 GITHUB_TOKEN : ${{ github.token }}
4053 run : ./.github/scripts/link-check.sh ${{ steps.modified-files.outputs.files }}
4154
4255 - name : Link check - all links (all files)
43- if : github.event_name != 'pull_request'
56+ if : github.event_name != 'pull_request' || steps.config-check.outputs.modified == 'true'
4457 env :
4558 GITHUB_TOKEN : ${{ github.token }}
4659 run : ./.github/scripts/link-check.sh
You can’t perform that action at this time.
0 commit comments