Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
name: Create and publish a Docker image

on:
release:
types: [published, prereleased]
push:
branches:
- main
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2

- name: Log in to the Container registry
uses: docker/login-action@v3.4.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.7.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=sha

- name: Build and push Docker image
uses: docker/build-push-action@v6.18.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM debian:stable AS builder

RUN apt-get update && apt-get install -y \
git \
build-essential \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-openssl-dev \
ca-certificates \
libomp-dev

COPY . /usr/src
WORKDIR /usr/src
RUN make -j8

FROM debian:stable-slim

RUN apt-get update && apt-get install -y \
procps \
libgomp1 \
samtools

COPY --from=builder /usr/src/bin/* /usr/local/bin/