Skip to content

Commit

Permalink
Use if-no-files-found to ignore warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Sep 5, 2024
1 parent 355b4ef commit e1f23b1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
EXAMPLE_DIR=$(dirname "${EXAMPLE}")
EXAMPLE_FILE=$(basename "${EXAMPLE}")
echo "ARTIFACT_NAME=${EXAMPLE_FILE}" >> $GITHUB_ENV
mkdir -p figs
python rhodium/test/plot_to_savefig.py "${EXAMPLE}" "$(realpath figs/)"
Expand All @@ -71,15 +73,9 @@ jobs:
LD_LIBRARY_PATH="$(pwd):${LD_LIBRARY_PATH}"
python "${EXAMPLE_FILE}"
popd
if [ "$(ls figs | wc -l)" -gt "0" ]; then
echo "ARTIFACT_NAME=${EXAMPLE_FILE}" >> $GITHUB_ENV
fi
- name: Upload figures
uses: actions/upload-artifact@v4
if: ${{ env.ARTIFACT_NAME }} != ""
with:
name: "${{ env.ARTIFACT_NAME }}"
path: figs/
if-no-files-found: ignore

0 comments on commit e1f23b1

Please sign in to comment.