Skip to content

Commit

Permalink
Update transform-notebooks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vsyrgkanis authored Jul 30, 2024
1 parent 9aa00f3 commit 0cf1c0e
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/transform-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,16 @@ jobs:
id: verify_diff
run: |
git pull
dirs=(PM1 PM2 PM3 PM4 PM5 CM1 CM2 CM3 AC1 AC2 T)
for dir in "${dirs[@]}"; do
# Check if directory exists
if [ -d "$dir" ]; then
echo "Processing directory: $dir"
git add "$dir"/*.ipynb "$dir"/*.irnb "$dir"/*.Rmd
git diff "$dir"/*.ipynb "$dir"/*.irnb "$dir"/*.Rmd
git status --porcelain
CHANGES=$(git status --porcelain)
if [ -z "$CHANGES" ]; then
# if git diff --quiet "$dir"/*.ipynb "$dir"/*.irnb "$dir"/*.Rmd; then
echo "No changes were found"
else
echo "Found changes in directory: $dir"
echo "changed=true" >> $GITHUB_OUTPUT
break 1
fi
else
echo "Directory $dir does not exist."
fi
done
git status --porcelain
CHANGES=$(git status --porcelain)
if [ -z "$CHANGES" ]; then
echo "No changes were found"
else
echo "Found changes"
echo "$CHANGES"
echo "changed=true" >> $GITHUB_OUTPUT
break 1
fi
- name: Commit and push stripped .ipynb files
if: steps.verify_diff.outputs.changed == 'true'
Expand Down

0 comments on commit 0cf1c0e

Please sign in to comment.