From 710229248c354c8b75c42ceaf97d1b3b694ad291 Mon Sep 17 00:00:00 2001 From: Steven Lizano Date: Fri, 24 May 2024 10:52:22 -0600 Subject: [PATCH] try to get all changes from pr --- .github/workflows/linter.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 99e0064f6..34b91e644 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -45,13 +45,16 @@ jobs: run: dotnet restore - name: Get all changed files - id: changedFiles + id: changed-files run: | - echo "CHANGED_FILES=$(git diff --name-only origin/master...$GITHUB_SHA)" >> $GITHUB_OUTPUT + git fetch origin master + BASE_SHA=$(git merge-base origin/master $GITHUB_SHA) + CHANGED_FILES=$(git diff --name-only $BASE_SHA $GITHUB_SHA) + echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV - name: List all changed files env: - ALL_CHANGED_FILES: ${{ steps.changedFiles.outputs.current_commit }} + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.current_commit }} run: | for file in ${ALL_CHANGED_FILES}; do echo "$file was changed"