diff --git a/.github/workflows/gradle-check.yml b/.github/workflows/gradle-check.yml index 0921aff721836..0b47319faf65c 100644 --- a/.github/workflows/gradle-check.yml +++ b/.github/workflows/gradle-check.yml @@ -16,8 +16,24 @@ permissions: contents: read # to fetch code (actions/checkout) jobs: - gradle-check: + check-files: if: github.repository == 'opensearch-project/OpenSearch' + runs-on: ubuntu-latest + outputs: + RUN_GRADLE_CHECK: ${{steps.changed-files-specific.outputs.any_changed}} + steps: + - name: Get changed files in the docs folder + id: changed-files-specific + uses: tj-actions/changed-files@v44 + with: + files_ignore: | + release-notes/** + .github/** + **.md + + gradle-check: + needs: check-files + if: github.repository == 'opensearch-project/OpenSearch' && ${{needs.check-files}} == true permissions: contents: read # to fetch code (actions/checkout) pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)