Skip to content

Commit 76fa8f3

Browse files
authored
just condarc
1 parent bf9323f commit 76fa8f3

4 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
snakefile: .test/Snakefile
2323
args: "--cores 1"
2424

25-
- name: Test environment-file
25+
- name: Test condarc-file
2626
uses: ./
2727
with:
2828
directory: .test
2929
snakefile: .test/Snakefile
30-
environment-file: .test/environment.yaml
30+
condarc-file: .test/condarc.yaml
3131
args: "--cores 1"
3232

3333
- name: Test containerize
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
channels:
22
- https://prefix.dev/conda-forge
33
- https://prefix.dev/bioconda
4-
- nodefaults
5-
dependencies:
6-
- snakemake ==9.5.1
4+
always_yes: true
5+
show_channel_urls: true

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Snakemake version to use. If not specified, uses latest version. Pin a specific
3636

3737
Install Apptainer (true/false)
3838

39-
### `environment-file`
39+
### `condarc-file`
4040

41-
Path to a custom Conda environment file containing snakemake (e.g., 'etc/custom-environment.yml'). If not specified, a default environment with snakemake is generated.
41+
Path to a custom condarc file (e.g., 'etc/condarc.yaml')
4242

4343
## Example usage
4444

@@ -58,7 +58,7 @@ Path to a custom Conda environment file containing snakemake (e.g., 'etc/custom-
5858
args: '--cores 1 --sdm conda --conda-cleanup-pkgs cache'
5959
stagein: '' # additional preliminary commands to run (can be multiline)
6060
show-disk-usage-on-error: true
61-
environment-file: 'my-environment.yaml'
61+
condarc-file: 'condarc.yaml'
6262

6363

6464
- name: Create container file

action.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ inputs:
3838
description: Install Apptainer (true/false)
3939
required: false
4040
default: false
41-
environment-file:
42-
description: Path to a custom Conda environment file containing snakemake (e.g., 'etc/custom-environment.yml'). If not specified, a default environment with snakemake is generated.
43-
required: false
41+
condarc-file:
42+
description: Path to a custom condarc file for workflow action environment (e.g. '.condarc').
4443
default: ''
4544

4645
runs:
@@ -65,7 +64,6 @@ runs:
6564
sudo apt-get install -y apptainer
6665
6766
- name: Prepare .snakemake.environment.yaml
68-
if: ${{ inputs.environment-file == '' }}
6967
shell: bash -el {0}
7068
run: |
7169
cat <<EOF > .snakemake.environment.yaml
@@ -76,15 +74,15 @@ runs:
7674
dependencies:
7775
- snakemake ==${{ inputs.snakemake-version }}
7876
EOF
79-
80-
- name: Validate custom environment file
81-
if: ${{ inputs.environment-file != '' }}
77+
78+
- name: Validate custom condarc file
79+
if: ${{ inputs.condarc-file != '' }}
8280
shell: bash -el {0}
8381
run: |
84-
if [[ -f "${{ inputs.environment-file }}" ]]; then
85-
echo "Using custom environment file: ${{ inputs.environment-file }}"
82+
if [[ -f "${{ inputs.condarc-file }}" ]]; then
83+
echo "Using custom condarc file: ${{ inputs.condarc-file }}"
8684
else
87-
echo "Error: Custom environment file '${{ inputs.environment-file }}' not found"
85+
echo "Error: Custom condarc file '${{ inputs.condarc-file }}' not found"
8886
exit 1
8987
fi
9088
@@ -94,7 +92,7 @@ runs:
9492
channels: conda-forge,bioconda
9593
channel-priority: strict
9694
miniforge-version: latest
97-
environment-file: ${{ inputs.environment-file || '.snakemake.environment.yaml' }}
95+
condarc-file: ${{ inputs.condarc-file }}
9896
activate-environment: snakemake
9997

10098
- name: Display snakemake version

0 commit comments

Comments
 (0)