Commit 0c0a2b3 1 parent 45360db commit 0c0a2b3 Copy full SHA for 0c0a2b3
File tree 1 file changed +26
-2
lines changed
1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,28 @@ permissions:
12
12
contents : read # to fetch code (actions/checkout)
13
13
14
14
jobs :
15
+ check-files :
16
+ runs-on : ubuntu-latest
17
+ outputs :
18
+ RUN_GRADLE_CHECK : ${{ steps.changed-files-specific.outputs.any_changed }}
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - name : Get changed files
22
+ id : changed-files-specific
23
+ uses : tj-actions/changed-files@v44
24
+ with :
25
+ files_ignore : |
26
+ release-notes/*.md
27
+ .github/**
28
+ *.md
29
+
15
30
gradle-check :
16
- if : github.repository == 'opensearch-project/OpenSearch'
31
+ needs : check-files
32
+ if : github.repository == 'opensearch-project/OpenSearch' && needs.check-files.outputs.RUN_GRADLE_CHECK == 'true'
17
33
permissions :
18
34
contents : read # to fetch code (actions/checkout)
19
35
pull-requests : write # to create or update comment (peter-evans/create-or-update-comment)
20
36
issues : write # To create an issue if check fails on push.
21
-
22
37
runs-on : ubuntu-latest
23
38
timeout-minutes : 130
24
39
steps :
@@ -151,3 +166,12 @@ jobs:
151
166
with :
152
167
assignees : ${{ github.event.head_commit.author.username }}, ${{ github.triggering_actor }}
153
168
filename : .github/ISSUE_TEMPLATE/failed_check.md
169
+
170
+ check-result :
171
+ needs : [check-files, gradle-check]
172
+ if : always()
173
+ runs-on : ubuntu-latest
174
+ steps :
175
+ - name : Fail if gradle-check fails
176
+ if : ${{ needs.check-files.outputs.RUN_GRADLE_CHECK && needs.gradle-check.result == 'failure' }}
177
+ run : exit 1
You can’t perform that action at this time.
0 commit comments