Skip to content

Commit 8693efb

Browse files
committed
migrated to action for workflow
1 parent 7f2f51c commit 8693efb

File tree

4 files changed

+59
-32
lines changed

4 files changed

+59
-32
lines changed

Diff for: .docker_login

-3
This file was deleted.

Diff for: .github/workflows/publish_image.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: build-image
3+
4+
on:
5+
push:
6+
branches:
7+
tags:
8+
- 'v*'
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
env:
13+
GH_REPO: poquirion/ncov-tools
14+
steps:
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
- name: Login to DockerHub
18+
uses: docker/login-action@v1
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
- name: Build on all branch
23+
id: alpha
24+
uses: docker/build-push-action@v2
25+
with:
26+
push: true
27+
tags: ${{ env.GH_REPO }}:alpha
28+
cache-from: type=registry,ref=${{ env.GH_REPO }}:alpha
29+
cache-to: type=inline
30+
-
31+
name: Docker meta
32+
id: docker_meta
33+
uses: crazy-max/ghaction-docker-meta@v1
34+
with:
35+
images: ${{ env.GH_REPO }} # list of Docker images to use as base name for tags
36+
tag-sha: true # add git short SHA as Docker tag
37+
- name: push latest
38+
if: ${{ github.ref == 'ref/head/master' }}
39+
id: latest
40+
uses: docker/build-push-action@v2
41+
with:
42+
push: true
43+
tags: ${{ env.GH_REPO }}:latest
44+
cache-from: type=registry,ref=${{ env.GH_REPO }}:alpha
45+
cache-to: type=inline
46+
- name: push tag
47+
if: contains(github.ref, 'tags/v')
48+
id: tag
49+
uses: docker/build-push-action@v2
50+
with:
51+
push: true
52+
cache-from: type=registry,ref=${{ env.GH_REPO }}:alpha
53+
cache-to: type=inline
54+
tags: ${{ steps.docker_meta.outputs.tags }}
55+
labels: ${{ steps.docker_meta.outputs.labels }}

Diff for: .travis.yml

-23
This file was deleted.

Diff for: Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ RUN conda install pycryptosat \
88
&& conda config --set channel_priority strict
99

1010
ENV NCOV ncov-qc
11-
# make that two steps (base and then tools)
1211
ADD workflow/envs/environment.yml environment.yml
13-
ADD parser parser
1412
RUN conda env create --name $NCOV -f environment.yml \
1513
&& rm -rf /opt/conda/pkgs/
16-
RUN /opt/conda/envs/$NCOV/bin/pip install ./parser
14+
# make sure that container is not polluted by ~/.local install
1715
ENV PYTHONNOUSERSITE=1
1816
RUN mkdir -p /app/workdir
1917
ADD workflow /app
@@ -23,7 +21,7 @@ WORKDIR /app/workdir
2321
RUN mkdir -p /.singularity.d/env \
2422
&& echo ". /etc/profile.d/conda.sh" >> /etc/bash.bashrc \
2523
&& echo ". /etc/profile.d/conda.sh" >> /.singularity.d/env/999-conda.sh \
26-
&& echo "conda activate $NCOV" >> /etc/bash.bashrc \
27-
&& echo "conda activate $NCOV" >> /.singularity.d/env/999-conda.sh \
24+
&& echo "conda activate $NCOV 2>/dev/null" >> /etc/bash.bashrc \
25+
&& echo "conda activate $NCOV 2>/dev/null" >> /.singularity.d/env/999-conda.sh \
2826
&& rm /root/.bashrc && rm /bin/sh && ln -s /bin/bash /bin/sh
29-
#docker build --tag ncov-tools . && singularity build ../.snakemake/singularity/7f0a6cf10df7320052c57c5468fcf292.simg docker-daemon://ncov-tools:latest
27+
#docker build --tag ncov-tools . && singularity build ncov_tools.simg docker-daemon://ncov-tools:latest

0 commit comments

Comments
 (0)