-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 2.89 KB
/
images_depy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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