Update release.yml (#403) #162
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |