Skip to content

Commit

Permalink
CI: not sure why I removed it before
Browse files Browse the repository at this point in the history
  • Loading branch information
anishshobithps committed Jan 11, 2025
1 parent 8df77aa commit 1cbcbf6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ jobs:
# Fetch the latest changes
git fetch origin main
# Check for changes in .tex, .sty, .cls, or Docker-related files
if git diff --name-only HEAD^ HEAD | grep -E "^(.docker/|.*\.(tex|sty|cls)$)" > /dev/null; then
CHANGED=1
# Check if there are more than one commit to compare against
if [ "$(git rev-list --count HEAD)" -gt 1 ]; then
# Ensure that there is more than 1 commit in the history
if git diff --name-only HEAD^ HEAD | grep -E "^(.docker/|.*\.(tex|sty|cls)$)" > /dev/null; then
CHANGED=1
fi
else
# If there's no previous commit (only 1 commit), assume no changes to the relevant files
echo "Only one commit or no previous commit, skipping change check."
CHANGED=0
fi
echo "changed=${CHANGED}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 1cbcbf6

Please sign in to comment.