Skip to content

Commit 0b6e7d5

Browse files
committed
Skip dry run when no relevant files
1 parent 891d796 commit 0b6e7d5

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/pr.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,28 @@ jobs:
4646
run: python3 -m unittest discover -bs .github/scripts
4747

4848
publish-javadoc-dry-run:
49-
uses: ./.github/workflows/publish-javadoc.yml
49+
- name: Check for modified code
50+
id: diff
51+
uses: tj-actions/changed-files@v24
52+
with:
53+
files: |
54+
.github/workflows/publish-javadoc.yml
55+
.github/scripts/*
56+
**/src/**
57+
**/*.gradle*
58+
./gradle/*
59+
- name: Trigger dry run
60+
if: ${{ steps.diff.outputs.all_modified_files }}
61+
uses: ./.github/workflows/publish-javadoc.yml
5062

5163
check-new-api-spec-dry-run:
52-
uses: ./.github/workflows/check-new-api-spec.yml
64+
- name: Check for modified code
65+
id: diff
66+
uses: tj-actions/changed-files@v24
67+
with:
68+
files: |
69+
.github/workflows/check-new-api-spec.yml
70+
.github/scripts/*
71+
- name: Trigger dry run
72+
if: ${{ steps.diff.outputs.all_modified_files }}
73+
uses: ./.github/workflows/check-new-api-spec.yml

0 commit comments

Comments
 (0)