Skip to content

Commit

Permalink
another test for changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-erojaslizano committed May 24, 2024
1 parent 49c407e commit 40149b8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ jobs:
- name: Get all changed files
id: changed-files
run: |
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
echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.current_commit }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.changed_files }}
run: |
for (file in ${ALL_CHANGED_FILES}){
echo "$file was changed"
Expand All @@ -63,8 +60,6 @@ jobs:
- name: Run dotnet format on changed files
run: |
for file in $ALL_CHANGED_FILES; do
if [[ $file == *.cs ]]; then
echo "Formatting $file"
dotnet format $file --include $file --verify-no-changes --no-restore
fi
done

0 comments on commit 40149b8

Please sign in to comment.