Skip to content

Commit

Permalink
Check changed files before running gradle check
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed May 1, 2024
1 parent 5133e5f commit 3389397
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@ on:
- 'dependabot/**'
pull_request_target:
types: [opened, synchronize, reopened]
paths-ignore:
- 'release-notes/**'
- '.github/**'
- '**.md'

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:
- uses: actions/checkout@v3
- 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.outputs.RUN_GRADLE_CHECK
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)
Expand Down

0 comments on commit 3389397

Please sign in to comment.