Skip to content

wip: add gha for images #1

wip: add gha for images

wip: add gha for images #1

Workflow file for this run

name: Publish Docker Images (Depy)
on:
push:
branches: [ "add-gha-docker-images" ]
workflow_dispatch:
# fixme
env:
PROTOPLASM_PY_PKG_VERSION: "5.0.0"
GRPCIO_IMAGE_VERSION: "1.0.0"
PSYCOPG_VERSION: "3.1"
IMAGE_REGISTRY: "vayan"
jobs:
depy:
# TODO needs protoplasm release
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8.18", "3.9.18", "3.10.13", "3.11.8", "3.12.2"]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Set config variable env
run: |
DEPY_VERSION=`echo ${{ matrix.python-version }} | cut -d. -f1,2`
echp "DEPY_VERSION=${DEPY_VERSION}" >> $GITHUB_ENV
echo "IMG_FULL=${{ env.IMAGE_REGISTRY }}/protoplasm:${{ env.PROTOPLASM_PY_PKG_VERSION }}-depy${DEPY_VERSION}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/depy/Dockerfile
network: host
no-cache: true
push: true
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
PACKAGE_VERSION=${{ env.PROTOPLASM_PY_PKG_VERSION }}
tags: |
${{ env.IMG_FULL }}
${{ env.IMAGE_REGISTRY }}/protoplasm:latest-depy${{ env.DEPY_VERSION }}
depy_psycopg:
runs-on: ubuntu-latest
needs: [ depy ]
strategy:
matrix:
depy-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Set config variable env
run: |
echo "IMG_FULL=${{ env.IMAGE_REGISTRY }}/protoplasm:${{ env.PROTOPLASM_PY_PKG_VERSION }}-depy${{ matrix.depy-version }}-pyodbc${{ env.PSYCOPG_VERSION }}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/depy/pyodbc.Dockerfile
network: host
no-cache: true
push: true
build-args: |
BASE_IMAGE=${{ env.IMAGE_REGISTRY }}/protoplasm:${{ env.PROTOPLASM_PY_PKG_VERSION }}-depy${{ matrix.depy-version }}
PYODBC_VERSION=${{ env.PSYCOPG_VERSION }}
tags: |
${{ env.IMG_FULL }}
${{ env.IMAGE_REGISTRY }}/protoplasm:latest-depy${{ matrix.depy-version }}-pyodbc${{ env.PSYCOPG_VERSION }}
${{ env.IMAGE_REGISTRY }}/protoplasm:latest-depy${{ matrix.depy-version }}-pyodbc