Skip to content

Commit

Permalink
exit job when no new paths are found
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorighi committed Oct 21, 2024
1 parent b92d9bd commit 1ef804b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ensembl_rapid_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ jobs:
/\.gff3\.gz$/ {print dir "/" $NF}
' "${{env.SCRAPE}}" | grep -vFf "${{env.EXISTING_ACCESSIONS}}" > "${{env.PATHS}}"
cat "${{env.PATHS}}"
rm "${{env.SCRAPE}}"
rm "${{env.EXISTING_ACCESSIONS}}"
# Check if the output file is empty
if [ ! -s "${{env.PATHS}}" ]; then
echo "Any new path found. Exiting.."
exit 0
fi
- name: Map GFF3 paths to TSV file
run: |
# Map the filtered GFF3 paths to TSV file
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ncbi_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ jobs:
echo -e "${accession}\t${base_path}/${dir_to_cd}" >> "${{env.DIRS}}"
done < "${{env.PATHS}}"
# Check if the output file is empty
if [ ! -s "${{env.PATHS}}" ]; then
echo "Any new path found. Exiting.."
exit 0
fi
rm "${{env.PATHS}}"
Expand Down

0 comments on commit 1ef804b

Please sign in to comment.