Skip to content

Commit

Permalink
update workflow to use git merge-base to check for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Silverman committed Nov 13, 2024
1 parent d0af2d3 commit a9e3a97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/push_to_ejam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ jobs:
id: arrow_files_modified
run: |
# List modified files in the PR
modified_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
base_commit=$(git merge-base HEAD main)
modified_files=$(git diff --name-only "$base_commit" HEAD)
# Check if any Arrow files were modified (based on their file extension or path)
if echo "$modified_files" | grep -qE "\.arrow$"; then
echo "Arrow files were modified."
Expand Down

0 comments on commit a9e3a97

Please sign in to comment.