Skip to content

Commit

Permalink
- small addition on top of PR #5 to pass gracefully if no CSV process…
Browse files Browse the repository at this point in the history
…ing has occured
  • Loading branch information
amkrajewski authored Dec 2, 2024
1 parent 7abdcd0 commit 8cd0b2b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/excel2csv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,24 @@ jobs:
- name: Calculate diff
id: diff
run: |
git add *.csv
if ! compgen -G "*.csv" > /dev/null; then
echo "diff_count=0" >> $GITHUB_OUTPUT
echo "dois=" >> $GITHUB_OUTPUT
exit 0
fi
git add *.csv || true
if [ -z "$(git diff --cached)" ]; then
echo "diff_count=0" >> $GITHUB_OUTPUT
echo "dois=" >> $GITHUB_OUTPUT
exit 0
fi
DIFF_COUNT=$(git diff --cached --numstat | awk '{sum += $1 + $2} END {print sum}')
echo "diff_count=$DIFF_COUNT" >> $GITHUB_OUTPUT
- name: Check for changes in the metadata of uploaded files and then extract changing DOIs and add them to a set
if: steps.diff.outputs.diff_count != '0'
id: dois
run: |
METADATA_PREFIX=""
Expand Down

0 comments on commit 8cd0b2b

Please sign in to comment.