From 82708790e786e7fb6436f0f4dccc37cbd3514ca5 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Fri, 24 Apr 2026 10:13:21 +0200 Subject: [PATCH 1/3] fix: added containerize args, closes #57 --- README.md | 9 +++++++++ action.yml | 12 +++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b0e4a3..1bf6b4e 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,14 @@ Snakemake version to install from conda. Default `*` (latest available version f Optional Snakemake git branch to install from `https://github.com/snakemake/snakemake`. If set, this takes precedence over `snakemake-version` and Snakemake is installed from source via pip. +### `install-apptainer` + +Whether to install Apptainer (true/false). Default `false`. + +### `containerize-args` + +Additional arguments for `containerize`, can be one of 'dockerfile', 'apptainer' or '' (defaults to dockerfile) + ## Example usage ```yaml @@ -69,4 +77,5 @@ Optional Snakemake git branch to install from `https://github.com/snakemake/snak directory: ".test" snakefile: "workflow/Snakefile" task: "containerize" + containerize-args: "apptainer" ``` diff --git a/action.yml b/action.yml index 87742da..3070922 100644 --- a/action.yml +++ b/action.yml @@ -45,6 +45,10 @@ inputs: description: Install Apptainer (true/false) required: false default: "false" + containerize-args: + description: Additional arguments for --containerize, can be one of 'dockerfile', 'apptainer' or '' (defaults to dockerfile) + required: false + default: "" runs: using: "composite" @@ -117,4 +121,10 @@ runs: - name: Containerize snakemake if: ${{ inputs.task == 'containerize' }} shell: bash -el {0} - run: snakemake --directory ${{ inputs.directory }} --snakefile ${{ inputs.snakefile }} --show-failed-logs ${{ inputs.args }} --containerize > Dockerfile + run: | + if [[ "${{ inputs.containerize-args }}" == "apptainer" ]]; then + recipe="apptainer.def" + else + recipe="Dockerfile" + fi + snakemake --directory ${{ inputs.directory }} --snakefile ${{ inputs.snakefile }} --show-failed-logs ${{ inputs.args }} --containerize ${{ inputs.containerize-args }} > $recipe From 440ca6a7c44878ea33c49d84c8c70ee348d547f8 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Fri, 24 Apr 2026 10:13:48 +0200 Subject: [PATCH 2/3] update date --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 91f00bb..4538a2b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 snakemake +Copyright (c) 2019-2026 The Snakemake team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 0ea0798a94722d9dcac6507842df5be77eae965d Mon Sep 17 00:00:00 2001 From: m-jahn Date: Fri, 24 Apr 2026 13:35:25 +0200 Subject: [PATCH 3/3] fix: review comment --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bf6b4e..2ea389d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Preliminary commands to run before the workflow execution. ### `task` -Whether to run Snakemake or to generate a container image specification (in the form of a Dockerfile) that contains all required environments. Can be either `run` or `containerize`. Default `run`. +Whether to run Snakemake or to generate a container image specification (`Dockerfile`, `apptainer.def`) that contains all required environments. Can be either `run` or `containerize`. Default `run`. ### `show-disk-usage-on-error` @@ -42,7 +42,7 @@ Whether to install Apptainer (true/false). Default `false`. ### `containerize-args` -Additional arguments for `containerize`, can be one of 'dockerfile', 'apptainer' or '' (defaults to dockerfile) +Additional arguments for `containerize`, can be one of 'dockerfile', 'apptainer' or '' (defaults to dockerfile). ## Example usage