diff --git a/.github/workflows/build-aio-base.yml b/.github/workflows/build-aio-base.yml index f403cbe620d..301fd8766a8 100644 --- a/.github/workflows/build-aio-base.yml +++ b/.github/workflows/build-aio-base.yml @@ -2,6 +2,11 @@ name: Build AIO Base Image on: workflow_dispatch: + inputs: + base_tag_name: + description: 'Base Tag Name' + required: false + default: '' env: TARGET_BRANCH: ${{ github.ref_name }} @@ -22,27 +27,29 @@ jobs: - id: set_env_variables name: Set Environment Variables run: | + echo "TARGET_BRANCH=${{ env.TARGET_BRANCH }}" >> $GITHUB_OUTPUT + + if [ "${{ github.event.inputs.base_tag_name }}" != "" ]; then + echo "IMAGE_TAG=${{ github.event.inputs.base_tag_name }}" >> $GITHUB_OUTPUT + elif [ "${{ env.TARGET_BRANCH }}" == "master" ]; then + echo "IMAGE_TAG=latest" >> $GITHUB_OUTPUT + elif [ "${{ env.TARGET_BRANCH }}" == "preview" ]; then + echo "IMAGE_TAG=preview" >> $GITHUB_OUTPUT + else + echo "IMAGE_TAG=develop" >> $GITHUB_OUTPUT + fi + + if [ "${{ env.TARGET_BRANCH }}" == "master" ]; then echo "BUILDX_DRIVER=cloud" >> $GITHUB_OUTPUT echo "BUILDX_VERSION=lab:latest" >> $GITHUB_OUTPUT echo "BUILDX_PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT echo "BUILDX_ENDPOINT=makeplane/plane-dev" >> $GITHUB_OUTPUT - echo "TARGET_BRANCH=${{ env.TARGET_BRANCH }}" >> $GITHUB_OUTPUT - - echo "IMAGE_TAG=latest" >> $GITHUB_OUTPUT else echo "BUILDX_DRIVER=docker-container" >> $GITHUB_OUTPUT echo "BUILDX_VERSION=latest" >> $GITHUB_OUTPUT echo "BUILDX_PLATFORMS=linux/amd64" >> $GITHUB_OUTPUT echo "BUILDX_ENDPOINT=" >> $GITHUB_OUTPUT - - if [ "${{ env.TARGET_BRANCH }}" == "preview" ]; then - echo "TARGET_BRANCH=preview" >> $GITHUB_OUTPUT - echo "IMAGE_TAG=preview" >> $GITHUB_OUTPUT - else - echo "TARGET_BRANCH=develop" >> $GITHUB_OUTPUT - echo "IMAGE_TAG=develop" >> $GITHUB_OUTPUT - fi fi - id: checkout_files @@ -54,7 +61,6 @@ jobs: needs: [base_build_setup] env: BASE_IMG_TAG: makeplane/plane-aio-base:full-${{ needs.base_build_setup.outputs.image_tag }} - TARGET_BRANCH: ${{ needs.base_build_setup.outputs.gh_branch_name }} BUILDX_DRIVER: ${{ needs.base_build_setup.outputs.gh_buildx_driver }} BUILDX_VERSION: ${{ needs.base_build_setup.outputs.gh_buildx_version }} BUILDX_PLATFORMS: ${{ needs.base_build_setup.outputs.gh_buildx_platforms }} @@ -96,7 +102,6 @@ jobs: needs: [base_build_setup] env: BASE_IMG_TAG: makeplane/plane-aio-base:slim-${{ needs.base_build_setup.outputs.image_tag }} - TARGET_BRANCH: ${{ needs.base_build_setup.outputs.gh_branch_name }} BUILDX_DRIVER: ${{ needs.base_build_setup.outputs.gh_buildx_driver }} BUILDX_VERSION: ${{ needs.base_build_setup.outputs.gh_buildx_version }} BUILDX_PLATFORMS: ${{ needs.base_build_setup.outputs.gh_buildx_platforms }} diff --git a/.github/workflows/build-aio-branch.yml b/.github/workflows/build-aio-branch.yml index 6359dfe38c2..de68d4b96df 100644 --- a/.github/workflows/build-aio-branch.yml +++ b/.github/workflows/build-aio-branch.yml @@ -13,6 +13,10 @@ on: type: boolean required: false default: false + base_tag_name: + description: 'Base Tag Name' + required: false + default: '' release: types: [released, prereleased] @@ -52,7 +56,9 @@ jobs: echo "BUILDX_PLATFORMS=linux/amd64" >> $GITHUB_OUTPUT echo "BUILDX_ENDPOINT=" >> $GITHUB_OUTPUT - if [ "${{ env.TARGET_BRANCH }}" == "preview" ]; then + if [ "${{ github.event.inputs.base_tag_name }}" != "" ]; then + echo "AIO_BASE_TAG=${{ github.event.inputs.base_tag_name }}" >> $GITHUB_OUTPUT + elif [ "${{ env.TARGET_BRANCH }}" == "preview" ]; then echo "AIO_BASE_TAG=preview" >> $GITHUB_OUTPUT else echo "AIO_BASE_TAG=develop" >> $GITHUB_OUTPUT diff --git a/.github/workflows/feature-deployment.yml b/.github/workflows/feature-deployment.yml index 1abe0af196f..0c71564e120 100644 --- a/.github/workflows/feature-deployment.yml +++ b/.github/workflows/feature-deployment.yml @@ -2,6 +2,11 @@ name: Feature Preview on: workflow_dispatch: + inputs: + base_tag_name: + description: 'Base Tag Name' + required: false + default: 'preview' env: TARGET_BRANCH: ${{ github.ref_name }} @@ -29,7 +34,12 @@ jobs: echo "BUILDX_VERSION=latest" >> $GITHUB_OUTPUT echo "BUILDX_PLATFORMS=linux/amd64" >> $GITHUB_OUTPUT echo "BUILDX_ENDPOINT=" >> $GITHUB_OUTPUT - echo "AIO_BASE_TAG=develop" >> $GITHUB_OUTPUT + + if [ "${{ github.event.inputs.base_tag_name }}" != "" ]; then + echo "AIO_BASE_TAG=${{ github.event.inputs.base_tag_name }}" >> $GITHUB_OUTPUT + else + echo "AIO_BASE_TAG=develop" >> $GITHUB_OUTPUT + fi echo "TARGET_BRANCH=${{ env.TARGET_BRANCH }}" >> $GITHUB_OUTPUT