diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 56973f2aa9..a38ffd444f 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -21,6 +21,14 @@ jobs: with: fetch-depth: 0 + - name: Get changed files + id: files + run: | + # Get a list of files changed between the last commit and the previous commit + CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }}) + echo "Changed files: $CHANGED_FILES" + echo "::set-output name=changed_files::$CHANGED_FILES" + - name: Lint Code Base uses: super-linter/super-linter@v5 env: @@ -29,3 +37,5 @@ jobs: IGNORE_GITIGNORED_FILES: true VALIDATE_JSCPD: false JAVA_FILE_NAME: checkstyle.xml + with: + changed_files: ${{ steps.files.outputs.changed_files }}