Tidying, add samtools and trim_galore

This commit is contained in:
Phil Ewels 2020-03-06 14:03:13 +00:00
parent 198e9a85eb
commit c8ceddfe77
6 changed files with 51 additions and 9 deletions

View file

@ -20,26 +20,33 @@ jobs:
# Annoyingly, matrix can't take dynamic variables
- name: Find changed tools
run: |
TOOLS=$( git diff --name-only HEAD~ | egrep -o 'tools\/[^\/]+\/' | sort | uniq | awk NF )
echo "Tools that appear to have been updated:"
echo $TOOLS
TOOLS=$( git diff --name-only HEAD~ | egrep -o 'tools\/[^\/]+\/' | sort | uniq | awk NF | tr '\r\n' ' ' )
# Save so that GitHub Actions can see this variable in the next step
echo "::set-env name=TOOLS::$TOOLS"
echo "Tools that appear to have been updated:"
echo $TOOLS
- name: Build images
run: |
echo "Running the docker build"
echo $TOOLS
for d in tools/*; do
echo "In directory $d"
echo "Tools that appear to have been updated:"
echo -e $TOOLS
echo '-----'
for TOOL in $TOOLS; do
echo "Tool is $TOOL"
echo $TOOL
done;
echo '-----'
for d in tools/*; do
for TOOL in $TOOLS; do
echo "$d -- $TOOL"
if echo $d/ | grep -q "$TOOL"; then
cd "$GITHUB_WORKSPACE/$d"
TOOLNAME=$(basename `pwd`)
IMGNAME=docker.pkg.github.com/${GITHUB_REPOSITORY,,}/${TOOLNAME,,}:$GITHUB_SHA
# IMGNAME=docker.pkg.github.com/${GITHUB_REPOSITORY,,}/${TOOLNAME,,}:$GITHUB_SHA
# TODO: How do we have a proper version tag here?
IMGNAME=docker.pkg.github.com/${GITHUB_REPOSITORY,,}/${TOOLNAME,,}:latest
echo "Image name is: $IMGNAME"
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} docker.pkg.github.com
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin docker.pkg.github.com
docker build -t $IMGNAME .
docker push $IMGNAME
fi;

View file

@ -2,6 +2,7 @@ FROM nfcore/base:1.7
LABEL authors="phil.ewels@scilifelab.se" \
description="Docker image for nf-core modules fastqc"
# foobar
COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-modules-fastqc/bin:$PATH

View file

@ -0,0 +1,8 @@
FROM nfcore/base:1.7
LABEL authors="phil.ewels@scilifelab.se" \
description="Docker image for nf-core modules samtools"
# foobar
COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-modules-samtools/bin:$PATH

View file

@ -0,0 +1,9 @@
# You can use this file to create a conda environment for this pipeline:
# conda env create -f environment.yml
name: nf-core-modules-samtools
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- samtools=1.9

View file

@ -0,0 +1,8 @@
FROM nfcore/base:1.7
LABEL authors="phil.ewels@scilifelab.se" \
description="Docker image for nf-core modules trimgalore"
# foobar
COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-modules-trimgalore/bin:$PATH

View file

@ -0,0 +1,9 @@
# You can use this file to create a conda environment for this pipeline:
# conda env create -f environment.yml
name: nf-core-modules-trimgalore
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- trim-galore=0.6.4