From f493a03f56edc0d445e95c21111ef9fd33de095d Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Tue, 12 Mar 2024 01:01:03 +0530 Subject: [PATCH] fix: adding github workflow events --- .github/workflows/build-branch.yml | 32 ++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 44bae0efa..42cb18035 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -2,6 +2,27 @@ name: Branch Build on: workflow_dispatch: + inputs: + build-web: + required: false + description: "Build Web" + type: boolean + default: false + build-space: + required: false + description: "Build Space" + type: boolean + default: false + build-api: + required: false + description: "Build API" + type: boolean + default: false + build-proxy: + required: false + description: "Build Proxy" + type: boolean + default: false push: branches: - master @@ -18,15 +39,15 @@ jobs: name: Build-Push Web/Space/API/Proxy Docker Image runs-on: ubuntu-latest outputs: - gh_branch_name: ${{ steps.set_env_variables.outputs.TARGET_BRANCH }} + gh_branch_name: ${{ steps.set_env_variables.outputs.TARGET_BRANCH }} gh_buildx_driver: ${{ steps.set_env_variables.outputs.BUILDX_DRIVER }} gh_buildx_version: ${{ steps.set_env_variables.outputs.BUILDX_VERSION }} gh_buildx_platforms: ${{ steps.set_env_variables.outputs.BUILDX_PLATFORMS }} gh_buildx_endpoint: ${{ steps.set_env_variables.outputs.BUILDX_ENDPOINT }} - build_frontend: ${{ steps.changed_files.outputs.frontend_any_changed }} - build_space: ${{ steps.changed_files.outputs.space_any_changed }} - build_backend: ${{ steps.changed_files.outputs.backend_any_changed }} - build_proxy: ${{ steps.changed_files.outputs.proxy_any_changed }} + build_frontend: ${{ steps.changed_files.outputs.frontend_any_changed || github.event.inputs.build-web }} + build_space: ${{ steps.changed_files.outputs.space_any_changed || github.event.inputs.build-space }} + build_backend: ${{ steps.changed_files.outputs.backend_any_changed || github.event.inputs.build-api }} + build_proxy: ${{ steps.changed_files.outputs.proxy_any_changed || github.event.inputs.build-proxy }} steps: - id: set_env_variables @@ -280,4 +301,3 @@ jobs: DOCKER_BUILDKIT: 1 DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} -