diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index cc07db0b8cf9..7f221509a357 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -121,11 +121,30 @@ jobs: exit 1 fi - version=${{ inputs.version }} - # strip leading v if present - version=${version#v} - echo version=$version - echo version=$version >> $GITHUB_OUTPUT + if [[ "${{ steps.resolve-nightly-tag.outputs.nightly-tag }}" != '' ]]; then + if [[ "${{ inputs.nightly_tag_main }}" == '' ]]; then + echo "Must specify a main nightly tag to check out when building base image." + echo "Nightly tag main is empty. Exiting the workflow." + exit 1 + fi + echo "main nightly version=${{ inputs.nightly_tag_main }}" + echo "base nightly version=${{ inputs.nightly_tag_base }}" + echo "building image for nightly_version=${{ steps.resolve-nightly-tag.outputs.nightly-tag }}" + + # Strip leading v from nightly tag main if present + version=${{ inputs.nightly_tag_main }} + version=${version#v} + echo version=$version >> $GITHUB_OUTPUT + elif [[ "${{ inputs.version }}" != '' ]]; then + # strip leading v if present + version=${{ inputs.version }} + version=${version#v} + echo version=$version + echo version=$version >> $GITHUB_OUTPUT + else + echo "No version or ref specified. Exiting the workflow." + exit 1 + fi - name: Get Version Base if: ${{ inputs.version == '' && inputs.release_type == 'base' }} id: get-version-base @@ -189,7 +208,7 @@ jobs: - name: Check out the code at a specific ref uses: actions/checkout@v4 with: - ref: ${{ inputs.nightly_tag_main || needs.get-version.outputs.version || github.ref }} + ref: ${{ needs.get-version.outputs.version || github.ref }} persist-credentials: true - name: "Setup Environment" uses: ./.github/actions/setup-uv @@ -265,7 +284,7 @@ jobs: - name: Check out the code at a specific ref uses: actions/checkout@v4 with: - ref: ${{ inputs.nightly_tag_main || needs.get-version.outputs.version || github.ref }} + ref: ${{ needs.get-version.outputs.version || github.ref }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -313,7 +332,7 @@ jobs: - name: Check out the code at a specific ref uses: actions/checkout@v4 with: - ref: ${{ inputs.nightly_tag_main || needs.get-version.outputs.version || github.ref }} + ref: ${{ needs.get-version.outputs.version || github.ref }} - name: "Setup Environment" uses: ./.github/actions/setup-uv diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f17bdb2f54c..8048bfc70c09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -208,7 +208,7 @@ jobs: pre_release: ${{ inputs.pre_release }} secrets: inherit - call_docker_build_ep: + call_docker_build_main_ep: name: Call Docker Build Workflow for Langflow with Entrypoint if: inputs.build_docker_ep == true uses: ./.github/workflows/docker-build.yml diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml index 7f4faee8cdb2..74ecdf7444ae 100644 --- a/.github/workflows/release_nightly.yml +++ b/.github/workflows/release_nightly.yml @@ -14,6 +14,11 @@ on: required: true type: boolean default: false + build_docker_ep: + description: "Build Docker Image for Langflow Nightly with Entrypoint" + required: false + type: boolean + default: false nightly_tag_main: description: "Tag for the nightly main build" required: true @@ -34,6 +39,11 @@ on: required: true type: boolean default: false + build_docker_ep: + description: "Build Docker Image for Langflow Nightly with Entrypoint" + required: false + type: boolean + default: false nightly_tag_main: description: "Tag for the nightly main build" required: true @@ -197,8 +207,6 @@ jobs: needs: [release-nightly-base, release-nightly-main] uses: ./.github/workflows/docker-build.yml with: - # Version should _not_ contain the leading `v` - version: ${{ needs.release-nightly-base.outputs.version }} release_type: base nightly_tag_base: ${{ inputs.nightly_tag_base }} nightly_tag_main: ${{ inputs.nightly_tag_main }} @@ -210,10 +218,20 @@ jobs: needs: [release-nightly-main] uses: ./.github/workflows/docker-build.yml with: - # Version should _not_ contain the leading `v` - version: ${{ needs.release-nightly-main.outputs.version }} release_type: main nightly_tag_main: ${{ inputs.nightly_tag_main }} secrets: inherit + call_docker_build_main_ep: + name: Call Docker Build Workflow for Langflow with Entrypoint + if: always() && ${{ inputs.build_docker_ep == 'true' }} + needs: [release-nightly-main] + uses: ./.github/workflows/docker-build.yml + with: + release_type: main-ep + nightly_tag_main: ${{ inputs.nightly_tag_main }} + secrets: inherit + + +