Skip to content

Commit

Permalink
Add raw statements for template and update Singularity version in run…
Browse files Browse the repository at this point in the history
…ner.
  • Loading branch information
MatthiasZepper committed Oct 1, 2024
1 parent 8de7fe7 commit 01552c7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions nf_core/pipeline-template/.github/workflows/download_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ jobs:
with:
python-version: "3.12"
architecture: "x64"
- uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7

- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0
with:
singularity-version: 3.8.3
apptainer-version: 1.3.4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:
- name: Count the downloaded number of container images
id: count_initial
run: |
image_count=$(ls -1 ./singularity_container_images | wc -l)
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
echo "Initial container image count: $image_count"
echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV}
Expand All @@ -99,15 +101,18 @@ jobs:
- name: Count the downloaded number of container images
id: count_afterwards
run: |
image_count=$(ls -1 ./singularity_container_images | wc -l)
echo "Post-pipeline container image count: $image_count"
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
echo "Post-pipeline run container image count: $image_count"
echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV}
- name: Compare container image counts
run: |
{% raw %}
if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then
echo "The number of container images has changed. The pipeline has no support for offline runs!"
echo "$(expr ${{ env.IMAGE_COUNT_AFTER }}-${{ env.IMAGE_COUNT_INITIAL }}) additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!"
tree ./singularity_container_images
exit 1
else
echo "The pipeline can be downloaded successfully!"
fi
{% endraw %}

0 comments on commit 01552c7

Please sign in to comment.