Cache conda packages weekly #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cache .snakemake/conda each sunday / monday night | |
--- | |
name: Cache conda packages weekly | |
on: # yamllint disable-line rule:truthy | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
env: | |
CACHE_NUMBER: 0 # Increment this number to invalidate the cache | |
jobs: | |
weekly-cache: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: Set up cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.snakemake/conda | |
~/.cache/pre-commit/ | |
key: snakemake-conda-${{ env.CACHE_NUMBER }} | |
id: cache | |
- name: Download environments | |
uses: snakemake/[email protected] | |
with: | |
directory: . | |
snakefile: workflow/Snakefile | |
args: > | |
--use-conda | |
--conda-create-envs-only | |
--conda-frontend mamba | |
--cores 1 |