langflow/.github/workflows/docker-build.yml
Gabriel Luiz Freitas Almeida 9b2fe24abe
Update pyproject.toml versions and add Docker Build and Push workflow (#1985)
* chore: Update pyproject.toml versions for langflow and langflow-base

* feat(workflows): add Docker Build and Push workflow to automate building and pushing Docker images based on release type and version
feat(workflows): add Pre-release workflow to automate releasing Langflow packages based on release type and version
feat(workflows): create workflow to call Docker Build workflow and handle release creation based on release type
2024-05-27 13:08:28 -07:00

54 lines
1.4 KiB
YAML

name: Docker Build and Push
on:
workflow_call:
inputs:
version:
required: true
type: string
release_type:
required: true
type: string
workflow_dispatch:
inputs:
version:
required: true
type: string
release_type:
required: true
type: choice
options:
- base
- main
jobs:
docker_build:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: |
if [ "${{ inputs.release_type }}" == "base" ]; then
./docker/build_and_push_base.Dockerfile
else
./docker/build_and_push.Dockerfile
fi
tags: |
if [ "${{ inputs.release_type }}" == "base" ]; then
langflowai/langflow:base-${{ inputs.version }}
else
langflowai/langflow:${{ inputs.version }}
langflowai/langflow:1.0-alpha