Skip to content

Update python requirements and create slim docker image #412

Update python requirements and create slim docker image

Update python requirements and create slim docker image #412

Workflow file for this run

name: Build scpca-tools images
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE: alexslemonade/scpcatools
jobs:
build_and_push:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: Dockerfile
suffix: ""
- image: alexslemonade/scpcatools-slim
dockerfile: scpcatools_slim.Dockerfile
suffix: "-slim"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE}}
flavor: suffix=${{ matrix.suffix }},onlatest=true
tags: |
type=semver,pattern={{raw}}
type=edge,branch=main
- uses: docker/build-push-action@v4
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