Skip to content

Commit

Permalink
fix(ci): do not use git diff
Browse files Browse the repository at this point in the history
  • Loading branch information
bas-kirill committed Jul 22, 2024
1 parent ca3a5f4 commit 4903007
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ jobs:
- name: Check for changes in source files
id: check_changes
run: |
if git diff --quiet HEAD^ HEAD -- '**/*.kt'; then
echo "No changes in Kotlin files."
echo "changed=false" >> $GITHUB_OUTPUT
else
# Check for changes in Kotlin files in the last commit
changed_files=$(git diff --name-only HEAD~1 HEAD | grep '\.kt$')
if [ -n "$changed_files" ]; then
echo "Changes detected in Kotlin files."
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "No changes in Kotlin files."
echo "changed=false" >> $GITHUB_OUTPUT
fi
linter:
Expand Down

0 comments on commit 4903007

Please sign in to comment.