From f7cc2eca36761d9d2430c4d99428764c4a25bfde Mon Sep 17 00:00:00 2001 From: Manish Gupta <59428681+manishg3@users.noreply.github.com> Date: Tue, 7 Nov 2023 17:41:26 +0530 Subject: [PATCH] dev: Modified the branch-build action yaml (#2704) * cherrypicked code * removed PUSH event --- .github/workflows/build-branch.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 6159cc695..58c404e37 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -2,12 +2,6 @@ name: Branch Build on: - push: - branches: - - master - - release - - qa - - develop pull_request: types: - closed @@ -18,24 +12,25 @@ on: - develop env: - TARGET_BRANCH: '' + TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} jobs: branch_build_and_push: - if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.action =='closed' && github.event.pull_request.merged == true) }} + if: ${{ (github.event_name == 'pull_request' && github.event.action =='closed' && github.event.pull_request.merged == true) }} name: Build-Push Web/Space/API/Proxy Docker Image runs-on: ubuntu-20.04 steps: - name: Check out the repo uses: actions/checkout@v3.3.0 - - name: Set Target Branch Name on PR close - if: ${{ github.event_name == 'pull_request' && github.event.action =='closed' }} - run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV + + # - name: Set Target Branch Name on PR close + # if: ${{ github.event_name == 'pull_request' && github.event.action =='closed' }} + # run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - name: Set Target Branch Name on other than PR close - if: ${{ github.event_name == 'push' }} - run: echo "TARGET_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV + # - name: Set Target Branch Name on other than PR close + # if: ${{ github.event_name == 'push' }} + # run: echo "TARGET_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV - uses: ASzc/change-string-case-action@v2 id: gh_branch_upper_lower