Skip to content

Update python requirements and create slim docker image #434

Update python requirements and create slim docker image

Update python requirements and create slim docker image #434

Workflow file for this run

name: Build scpca-tools images
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
env:
REGISTRY: ghcr.io
REGISTRY_USER: alexslemonade
jobs:
build_and_push:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- image_name: scpcatools
dockerfile: Dockerfile
- image_name: scpcatools-slim
dockerfile: scpcatools_slim.Dockerfile
- image_name: scpcatools-reports
dockerfile: scpcatools_reports.Dockerfile
- image_name: scpcatools-scvi
dockerfile: scpcatools_scvi.Dockerfile
- image_name: scpcatools-seurat
dockerfile: scpcatools_seurat.Dockerfile
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_USER }}/${{ matrix.image_name }}
tags: |
type=semver,pattern={{raw}}
type=edge,branch=main
- uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:docker"
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha