From cfdf1bd5eb3eb3150d0b76749169b9a54c32f61f Mon Sep 17 00:00:00 2001 From: Steven Lizano Date: Fri, 24 May 2024 15:29:31 -0600 Subject: [PATCH] new test --- .github/workflows/linter.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index acbbe2425..eb169fa0e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -44,18 +44,30 @@ jobs: - name: Run dotnet restore run: dotnet restore + - name: base SHA + id: base-sha + run: | + echo "baseSHA=git merge-base origin/master" >> $GITHUB_OUTPUT + - name: Get all changed files id: changed-files + env: + BASE_SHA: ${{ steps.base-sha.outputs.baseSHA }} run: | - echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT + echo "changed_files=git diff --name-only $BASE_SHA $GITHUB_SHA" >> $GITHUB_OUTPUT - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.changed_files }} run: | - for (file in ${ALL_CHANGED_FILES}){ - echo "$file was changed" - } + echo "$ALL_CHANGED_FILES" + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.changed_files }} + run: | + for (file in ${ALL_CHANGED_FILES}){ + echo "$file was changed" + } - name: Run dotnet format on changed files run: |