diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9951a3..bc87ecc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,27 +9,27 @@ on: jobs: build: - runs-on: ubuntu-latest - + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 + + - name: Test run + uses: ./ + with: + directory: .test + snakefile: .test/Snakefile + args: "--cores 1" - - name: Test run - uses: ./ - with: - directory: .test - snakefile: .test/Snakefile - args: "--cores 1" + - name: Test containerize + uses: ./ + with: + directory: .test + snakefile: .test/Snakefile + install-apptainer: true + args: "--cores 1" + task: "containerize" - - name: Test containerize - uses: ./ - with: - directory: .test - snakefile: .test/Snakefile - args: "--cores 1" - task: "containerize" - - - name: Show Dockerfile - run: | - cat Dockerfile + - name: Show Dockerfile + run: | + cat Dockerfile diff --git a/action.yml b/action.yml index 25ff55b..44ce152 100644 --- a/action.yml +++ b/action.yml @@ -17,15 +17,15 @@ inputs: args: description: Additional Snakemake arguments to use required: false - default: '' + default: "" stagein: description: Additional steps to prepare the workflow for execution required: false - default: '' + default: "" task: description: Whether to run Snakemake or to generate a container image specification. required: false - default: 'run' + default: "run" show-disk-usage-on-error: description: Whether to return the used disk space on failing. required: false @@ -33,14 +33,14 @@ inputs: snakemake-version: description: Snakemake version to use. If not specified, uses latest version. Pin a specific version (e.g., '8.25.5') for reproducibility. required: false - default: '*' + default: "*" install-apptainer: description: Install Apptainer (true/false) required: false default: false runs: - using: 'composite' + using: "composite" steps: - name: Validate inputs if: ${{ ! (inputs.task == 'containerize' || inputs.task == 'run' )}} @@ -57,8 +57,10 @@ runs: echo "Error: This action currently supports Apptainer installation only on Ubuntu runners" exit 1 fi + sudo add-apt-repository -y ppa:apptainer/ppa sudo apt-get update sudo apt-get install -y apptainer + - name: Prepare .snakemake.environment.yaml shell: bash -el {0} run: | @@ -104,4 +106,3 @@ runs: if: ${{ inputs.task == 'containerize' }} shell: bash -el {0} run: snakemake --directory ${{ inputs.directory }} --snakefile ${{ inputs.snakefile }} --show-failed-logs ${{ inputs.args }} --containerize > Dockerfile -