Skip to content

Commit

Permalink
Use github packages for docker registry
Browse files Browse the repository at this point in the history
  • Loading branch information
informationsea committed Jul 24, 2024
1 parent 78fb801 commit a2211c0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,47 @@ on:
pull_request:
branches: [master]

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

jobs:
buildx:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- version: "1.20"
platform:
- linux/amd64
- linux/arm64
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
install: true
- name: Build
run: |
docker build \
--build-arg SAMTOOLS_VERSION=${{ matrix.config.version }} \
--build-arg BCFTOOLS_VERSION=${{ matrix.config.version }} \
--build-arg HTSLIB_VERSION=${{ matrix.config.version }} \
--tag bioslimcontainers/samtools:${{ matrix.config.version }} .
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.config.version }}
platforms: ${{ matrix.platform }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ WORKDIR /htslib-${HTSLIB_VERSION}
RUN ./configure && make -j4 && make install

FROM debian:12-slim
LABEL maintainer="[email protected]"
LABEL version="1.1"
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y curl tar xz-utils bzip2 libcurl4 libncursesw6 libssl3 zlib1g liblzma5 libbz2-1.0 && \
apt-get clean && \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ samtools/bcftools/htslib

[![Build docker container](https://github.com/bioslimcontainers/samtools/actions/workflows/docker.yml/badge.svg)](https://github.com/bioslimcontainers/samtools/actions/workflows/docker.yml)

Slim samtools/bcftools/htslib containers based on alpine linux.
Slim samtools/bcftools/htslib containers based on debian-slim.

* [Docker Hub](https://hub.docker.com/r/bioslimcontainers/samtools)
* [Github Packages](https://github.com/bioslimcontainers/samtools/pkgs/container/samtools)

Upstream Projects
-----------------
Expand Down

0 comments on commit a2211c0

Please sign in to comment.