From 0cf1c0ebd531e92d33057003696069dd2876e622 Mon Sep 17 00:00:00 2001 From: vsyrgkanis Date: Tue, 30 Jul 2024 02:05:44 -0700 Subject: [PATCH] Update transform-notebooks.yml --- .github/workflows/transform-notebooks.yml | 32 +++++++---------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/transform-notebooks.yml b/.github/workflows/transform-notebooks.yml index 57ba741..0460d65 100644 --- a/.github/workflows/transform-notebooks.yml +++ b/.github/workflows/transform-notebooks.yml @@ -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'