Skip to content

Docker images release job #217

Docker images release job

Docker images release job #217

Workflow file for this run

name: ci
on:
push:
tags:
- v*
pull_request:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
tests:
needs: [pre-commit]
name: "pytest and snakemake"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Install extra dependencies
run: uv sync --extra cellpose --extra wsi --dev && uv run pip install snakemake 'pulp<2.8'
- name: Tests
run: uv run pytest
- name: Snakemake
run: cd workflow && uv run snakemake --config sdata_path=tuto.zarr --configfile=config/toy/cellpose.yaml --workflow-profile profile/ci -c1
deploy-docs:
needs: [tests]
if: contains(github.ref, 'tags')
name: "Deploy documentation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Install extra dependencies
run: uv sync --dev
- name: Build documentation
run: uv run mkdocs gh-deploy --force
pypi-release:
needs: [tests]
if: contains(github.ref, 'tags')
name: "PyPI release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-python-env
- name: Build
run: uv build
- name: Publish
run: uv publish -t ${{ secrets.PYPI_TOKEN }}
docker-images-release:
needs: [tests]
if: contains(github.ref, 'tags')
name: "Docker images release"
runs-on: ubuntu-latest
strategy:
matrix:
extra-name: ["", "baysor", "cellpose", "proseg", "stardist"]
env:
EXTRA_NAME_SUFFIX: ${{ matrix.extra-name == "" && "" || format('-{0}', matrix.extra-name) }}

Check failure on line 89 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 89, Col: 26): Unexpected symbol: '""'. Located at position 22 within expression: matrix.extra-name == "" && "" || format('-{0}', matrix.extra-name)
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
platform: linux/amd64,linux/arm64
tags: ${{ vars.DOCKERHUB_USERNAME }}/sopa:${{ github.ref_name }}${{ env.EXTRA_NAME_SUFFIX }}
context: docker/sopa${{ env.EXTRA_NAME_SUFFIX }}