Skip to content

1.2.0

1.2.0 #13

Workflow file for this run

name: Build and Push Docker Images
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Tag to use for the images (e.g., v1.0.0)'
required: true
type: string
connect_client_version:
description: 'Version of connect-client to use (e.g., 0.9)'
required: true
type: string
default: '0.9'
env:
REGISTRY: ghcr.io
# Use release tag for releases, or input tag for manual runs
IMAGE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.tag }}
# Use provided connect-client version or default to 0.9
CONNECT_CLIENT_VERSION: ${{ inputs.connect_client_version || '0.9' }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
container: [
{ name: 'ttyd', path: './ttyd' },
{ name: 'streamlit', path: './streamlit' },
{ name: 'cellxgene', path: './cellxgene' },
{ name: 'shiny', path: './shiny-simple-example' },
{ name: 'marimo', path: './marimo' }
]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push ${{ matrix.container.name }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.container.path }}
push: true
build-args: |
CONNECT_CLIENT_VERSION=${{ env.CONNECT_CLIENT_VERSION }}
tags: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.container.name }}:${{ env.IMAGE_TAG }}
${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.container.name }}:latest
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.description=Custom Studios Example Container for ${{ matrix.container.name }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.version=${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max