chore: Set Dockerfile and Tags dynamically in Docker Build and Push workflow
This commit is contained in:
parent
11c874cd96
commit
26c85f191e
1 changed files with 11 additions and 12 deletions
23
.github/workflows/docker-build.yml
vendored
23
.github/workflows/docker-build.yml
vendored
|
|
@ -35,20 +35,19 @@ jobs:
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Set Dockerfile and Tags
|
||||||
|
id: set-vars
|
||||||
|
run: |
|
||||||
|
if [ "${{ inputs.release_type }}" == "base" ]; then
|
||||||
|
echo "DOCKERFILE=./docker/build_and_push_base.Dockerfile" >> $GITHUB_ENV
|
||||||
|
echo "TAGS=langflowai/langflow:base-${{ inputs.version }}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "DOCKERFILE=./docker/build_and_push.Dockerfile" >> $GITHUB_ENV
|
||||||
|
echo "TAGS=langflowai/langflow:${{ inputs.version }},langflowai/langflow:1.0-alpha" >> $GITHUB_ENV
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
file: |
|
file: ${{ env.DOCKERFILE }}
|
||||||
if [ "${{ inputs.release_type }}" == "base" ]; then
|
tags: ${{ env.TAGS }}
|
||||||
./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
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue