-
Notifications
You must be signed in to change notification settings - Fork 28
82 lines (65 loc) · 2.16 KB
/
release.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
name: Docker Image Push
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
extra_tag:
description: 'Tag suffix'
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Docker Login
uses: docker/[email protected]
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
- name: Docker Build
env:
QUAYIO_ORG: quay.io/numaio
PLATFORM: linux/x86_64
TARGET: numalogic/udf
TAG_SUFFIX: ${{ inputs.extra_tag }}
run: |
type=$(basename $(dirname $GITHUB_REF))
tag=$(basename $GITHUB_REF)
if [[ $type == "heads" ]]; then
tag="$(basename $GITHUB_REF)v${{ env.version }}"
fi
echo "Tag: $tag"
echo "Type: $type"
echo "Tag suffix: $TAG_SUFFIX"
if [[ -n $TAG_SUFFIX ]]; then
tag="$(basename $GITHUB_REF)-${TAG_SUFFIX}"
fi
image_name="${QUAYIO_ORG}/numalogic/udf:${tag}"
docker buildx build --platform ${PLATFORM} --build-arg INSTALL_EXTRAS='redis druid' --output "type=image,push=true" . -t $image_name
- name: Docker RDS Build
env:
QUAYIO_ORG: quay.io/numaio
PLATFORM: linux/x86_64
TARGET: numalogic/udf
TAG_SUFFIX: ${{ inputs.extra_tag }}
run: |
type=$(basename $(dirname $GITHUB_REF))
tag=$(basename $GITHUB_REF)
if [[ $type == "heads" ]]; then
tag="$(basename $GITHUB_REF)v${{ env.version }}"
fi
echo "Tag: $tag"
echo "Type: $type"
echo "Tag suffix: $TAG_SUFFIX"
if [[ -n $TAG_SUFFIX ]]; then
tag="$(basename $GITHUB_REF)-rds-${TAG_SUFFIX}"
fi
image_name="${QUAYIO_ORG}/numalogic/udf:rds-${tag}"
docker buildx build --platform ${PLATFORM} --build-arg INSTALL_EXTRAS='redis rds' --output "type=image,push=true" . -t $image_name